Skip to content

Support files being counted twice #32

joefiorini opened this Issue Jan 31, 2012 · 4 comments

3 participants


I store my step definitions in spec/support. I just upgraded to 0.3 from 0.2 (and Rails 3.2). All my features were passing on 0.2. I'm now seeing Ambiguous errors for every step in my suite. Looking into it further shows it's matching the step files twice, once with a full path and once with a relative path:

[#<struct Turnip::StepDefinition::Match step_definition=#<Turnip::StepDefinition:0x007ffb4c528ee8 @expression="I am signed in as a teacher", @block=#<Proc:0x007ffb4c528f10@/Users/joe/Projects/barefoot/impact-everyday-web/spec/support/authentication_steps.rb:29>, @regexp=/^I\ am\ signed\ in\ as\ a\ teacher$/>, params=[], block=#<Proc:0x007ffb4c528f10@/Users/joe/Projects/barefoot/impact-everyday-web/spec/support/authentication_steps.rb:29>>, #<struct Turnip::StepDefinition::Match step_definition=#<Turnip::StepDefinition:0x007ffb4cae9d28 @expression="I am signed in as a teacher", @block=#<Proc:0x007ffb4caeaa98@spec/support/authentication_steps.rb:29>, @regexp=/^I\ am\ signed\ in\ as\ a\ teacher$/>, params=[], block=#<Proc:0x007ffb4caeaa98@spec/support/authentication_steps.rb:29>>]

Any thoughts on this?

leshill commented Jan 31, 2012

Hi Joe,

Can you show your .rspec and your spec_helper.rb?


Here you go: Thanks!

leshill commented Feb 2, 2012

Hi Joe,

Nothing really jumps out, but I suspect that moving your step files from spec/support to spec/features might clear this up.

jnicklas commented Jun 6, 2012

Turnip no longer loads step definitions automatically, so this should no longer be an issue.

@jnicklas jnicklas closed this Jun 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.