Closed sergiopatricio closed 10 years ago
@sandro I leave you merging this one, as @sergiopatricio is a coworker :)
@pierreozoux cool, I get it. Should we go ahead and switch step_mother to runtime? I don't have any problems with supporting the latest version of cucumber. I may upgrade the rspec dependency to the latest as well.
I think we can. I can update the pull request.
This will only support cucumber 1.2.2 to 1.2.5. I tested the latest 1.3.x version and it seems we need other fixes on the code, but its another issue.
I just updated the code to use runtime
instead of step_mother
.
Also updated specjour.gemspec
to require specjour 1.2.2, I'm not sure if it should be a separate commit or if you normally update this file.
I also noticed that with the latests commits in master I can't run the specs in my project. It's not related with this pull request. I will have to look into it to see if the issue is from specjour or my project.
I'm closing/cancelling this pull request for now as I'm not satisfied with the final result.
I was confused about dependencies, cucumber is a dependency only for development, not for release. So when a user installs specjour the cucumber version is not managed by bundler, and so nothing guarantees that the user has the correct version of cucumber.
So I think the solution should try to support multiples versions of cucumber. Probably is just a question of using only the instance variable instead of the defined attr_reader. I will test some cucumber versions to see if it works and reopen the pull request when I have a better solution.
Sure, I support you're willingness to support older versions of cucumber. When RSPec 2 came out, specjour supported both RSpec 1 and RSpec 2 for a time. Eventually, we decided to only support the latest. I'm perfectly happy making that decision for cucumber as well—let's do what's easiest and support the latest version of cucumber.
@sandro I'm reopening this. So I renamed step_mother to runtime and used the instance variable instead of the attr_reader. This way works for cucumber ~>1.2.2 and it keeps working with previous versions. Tested with cucumber 1.2.1 and 1.2.5 and is working fine.
As discussed in #59 this change allows to support cucumber version >=1.2.2
In https://github.com/cucumber/cucumber/commit/f74a8dad3e8ff1b1e9fe7762369266817f229a8f
step_mother
was renamed toruntime
. This fix allows to work with cucumber versions >=1.2.2 without updating the specjour gem dependency requirements.Note: cucumber version 1.3 is still not supported.