Looking at cucumber.yml, I can see that whatever is in rerun.txt is
added to the cucumber options. In my case, "features/subdir/
create_new_program.feature:10" After doing some research I see that
had I simply run "cucumber features/subdir/create_new_program.feature:
10" it would be expected that it wouldn't find the root level support
files without me doing a require. However, this seems like very
strange behavior to happen by default.
Am I missing something?
I really like the re-run idea (it reminds me of autospec?), but it
would benefit from some documentation & either the generator amending
with the require, or someone who knows cucumber better than I do
suggesting a better solution.
On Jan 29, 8:03 pm, drewB <dbats...@gmail.com> wrote:
> I just installed the latest version of cuke and wrote a feature in a
> sub directory. At some point after writing step definitions, I run
> cucumber from the app root and it gave me errors related to webrat
> functions being undefined (e.g. undefined method `visit'). If I deletererun.txt and then run cucumber everything is fine.
>
> Looking at cucumber.yml, I can see that whatever is inrerun.txt is
By tweaking your config/cucumber.yml you can make it so that the
rerun.txt is always generated, but by default all the features are
executed. By also defining a profile that runs the features in
rerun.txt, this gives you the best of both worlds: after a failure
just run rake -p rerun to rerun only the failed features.
For example:
<%
no_rerun_opts = "--format progress features"
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
conditional_rerun_opts = rerun.to_s.strip.empty? ? no_rerun_opts :
"--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
common_opts = "--format rerun --out rerun.txt --strict --tags ~@wip"
rerun_opts = "#{conditional_rerun_opts} #{common_opts}"
default_opts = "#{no_rerun_opts} #{common_opts}"
%>
default: <%= default_opts %>
rerun: <%= rerun_opts %>
wip: --tags @wip:3 --wip features
Email breaks code.
Aslak
> --
> You received this message because you are subscribed to the Google Groups "Cukes" group.
> To post to this group, send email to cu...@googlegroups.com.
> To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cu...@googlegroups.com.
To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
I agree. What about a --rerun flag? Cucumber can still write out the
failing features, but will only care about its contents if run with
--rerun.
I would have suggested it if you hadn't...
+1
--
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
--
https://rspec.lighthouseapp.com/projects/16211-cucumber/tickets/568-rerun