Various results from same test

Hi,

I’ve read on the ‘Cucumber Backgrounder’ page that running cuc via
rake, command line and autotest could give different results but I
seem to get different results depending on the path I pass cucumber
and am not sure what’s going on. I would be grateful for any help or
insight.

There’s a fresh rails app with features/admin_management/
{crud_admins.feature,crud_admins_steps.rb} and the other default
files. webrat, rspec(-rails) and cucumber are installed as plugins
from their respective master branches (as of a couple hours ago) - I
had them installed as gems initially but now gems are all uninstalled
and only plugins reside.

crud_admins.feature; just has a single step:
Scenario: Create an admin user
Given I can see the form to create an admin user

crud_admins_steps.rb; just has a single step-def:
Given “I can see the form to $action a(n)? $controller $domain” do |
action, _, controller, domain|
visit path_to("#{action} #{controller} #{domain}")
end

If I run script/cucumber features/admin_management/ crud_admins.feature; I see:
undefined method `visit’ for

If I run script/cucumber features; I see:
No route matches “/admin/users/create”

which is what I expect.

There are no migrations yet; could that be an/the issue?

  • Jeremiah

On Tue, Apr 14, 2009 at 1:32 PM, Jeremiah Heller
[email protected]wrote:

plugins from their respective master branches (as of a couple hours ago) - I
visit path_to(“#{action} #{controller} #{domain}”)

There are no migrations yet; could that be an/the issue?

Can you post the full backtrace in addition to the error message?

Aslak

On 14 Apr 2009, at 05:41, aslak hellesoy wrote:

If I run `script/cucumber features/admin_management/
Can you post the full backtrace in addition to the error message?
Here it is. Thanks for taking a look.

undefined method visit' for #<Object:0x11b50ac> (NoMethodError) ./features/admin_management/crud_admins_steps.rb:5:in__instance_exec0’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/core_ext/instance_exec.rb:60:in send' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/core_ext/instance_exec.rb:60:ininstance_exec’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/core_ext/instance_exec.rb:20:in cucumber_instance_exec' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/core_ext/instance_exec.rb:38:incucumber_run_with_backtrace_filtering’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/core_ext/instance_exec.rb:10:in cucumber_instance_exec' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/step_definition.rb:102:ininvoke’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/step_match.rb:13:in invoke' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/ast/step_invocation.rb:32:ininvoke’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/ast/step_invocation.rb:22:in accept' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/ast/visitor.rb:74:invisit_step’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/formatter/pretty.rb:120:in visit_step' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/ast/step_collection.rb:14:inaccept’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/ast/step_collection.rb:13:in each' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/ast/step_collection.rb:13:inaccept’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/ast/visitor.rb:70:in visit_steps' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/ast/scenario.rb:33:inaccept’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/step_mother.rb:201:in before_and_after' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/ast/scenario.rb:32:inaccept’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/ast/visitor.rb:45:in visit_feature_element' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/formatter/pretty.rb:79:invisit_feature_element’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/ast/feature.rb:22:in accept' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/ast/feature.rb:21:ineach’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/ast/feature.rb:21:in accept' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/ast/visitor.rb:23:invisit_feature’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/formatter/pretty.rb:41:in visit_feature' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/ast/features.rb:21:inaccept’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/ast/features.rb:20:in each' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/ast/features.rb:20:inaccept’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/ast/visitor.rb:19:in visit_features' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/formatter/pretty.rb:26:invisit_features’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/broadcaster.rb:9:in __send__' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/broadcaster.rb:9:inmethod_missing’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/broadcaster.rb:8:in map' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/broadcaster.rb:8:inmethod_missing’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/…/lib/
cucumber/cli/main.rb:41:in execute!' /Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/../lib/ cucumber/cli/main.rb:20:inexecute’
/Users/jf/Sites/tarbis/vendor/plugins/cucumber/bin/cucumber:6
script/cucumber:3:in load' script/cucumber:3 features/admin_management/crud_admins.feature:7:inGiven I can
see the form to create an admin user’