[rspec-users] various results from same test

Jeremiah Heller jeremiah.heller at gmail.com
Tue Apr 14 16:06:59 EDT 2009


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

> 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?
>
> 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:in `instance_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:in  
`cucumber_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:in `invoke'
       /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:in `invoke'
       /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:in `visit_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:in `accept'
       /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:in `accept'
       /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:in `accept'
       /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:in `accept'
       /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:in `visit_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:in `each'
       /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:in `visit_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:in `accept'
       /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:in `accept'
       /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:in `visit_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:in `method_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:in `method_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:in `execute'
       /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:in `Given I can  
see the form to create an admin user'


More information about the rspec-users mailing list