-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
old rspec syntax in web_steps gives deprecation warnings #17
Comments
a PR to change to |
It's fairly easy to fix - you have to change about three lines in web_steps.rb from
to
An alternative fix would be enable "should" syntax in the rspec configuration file, as per the deprecation warning above. I tried adding the necessary line to |
@armandofox - upon further investigation, it turns out that generating a pull request to fix this issue is not straightforward for a number of reasons. The deprecated code in
https://github.com/cucumber/cucumber-rails-training-wheels In principle, you could patch I think there are four possible solutions to the problem:
In my opinion:
My solution was a subset of 4 because I couldn't figure out how to get 3 to work. As an experiment, I tried installing the project without |
i agree with your assessment. i'd do (3) for now - i'll try to address (1) in the Fall lecture materials but the changes are significant since it also entails changes to the book and requires explaining some of capybara before any of cucumber can be explained. i think the suppression of deprecation warnings in this narrow case is defensible, since we go to great lengths later to tell people not to use web_steps as a crutch and instead write their own step defs. i've been over this with a couple of people and keep coming back to the same opinion - training wheels have a valid purpose :-) |
@armandofox - thanks. I agree that (3) is the most pragmatic solution for now, but unfortunately, I can't get it to work. In particular, inserting the following line of code after line 31 of
I'm also concerned that |
You're right that running rspec:install creates a spec-helper file that doesn't include the workaround for deprecation. I think we may just need to instruct the students to add the following inside the configure block in that file (ie provide explicit instructions and an explanation in the toplevel README), which would allow either the old or new syntax to be used:
|
@armandofox - as noted earlier, specifying a value for the According to the following web page, if you want to configure RSpec for Cucumber, you need to add some code to https://github.com/cucumber/cucumber/wiki/RSpec-Expectations However,
Hence, the best solution is to ask students to create a separate
I think this approach is better than asking students to edit an auto-generated file. I can also confirm that it works! |
Sounds like a reasonable solution to me - want to implement it and do a PR? thanks for staying with this! |
@armandofox - thanks. I've just created a pull request to update |
The text was updated successfully, but these errors were encountered: