Tyler-Keith-Thompson / CucumberSwift

A lightweight swift Cucumber implementation
https://tyler-keith-thompson.github.io/CucumberSwift/documentation/cucumberswift/
MIT License
74 stars 19 forks source link

See https://github.com/Tyler-Keith-Thompson/CucumberSwift/issues/68 #70

Closed DevMobileAS closed 1 year ago

DevMobileAS commented 1 year ago

This change fixes the deprecation warning when using the code from the automatic stub generation.

Tyler-Keith-Thompson commented 1 year ago

Thanks for the PR! The change seems reasonable to me, I expect (hope?) that tests will fail, because we're generating something slightly different. If so one of us will need to update the tests, if not I'll merge this and retroactively add them.

DevMobileAS commented 1 year ago

As you already guessed, the test did fail. ;-)

Unfortunately I'm not sure how you'd want to deal with the problem that using RegexLiterals in the tests now need your project to update your deployment target to iOS 16.

Furthermore when trying to fix the tests itself I ran into another problem: Method.generateSwift() is generating the variable names using my locale (German) to something like "let integerZwei". But the tests statically expect the results to contain "let integerTwo" and fail. Either the tests itself need more localization within the expectations or the correct localization needs to me mocked or something.

Tyler-Keith-Thompson commented 1 year ago

Good call, it's easy to forget about localization issues in tests.

I'll take a stab at this as soon as I can.