#6 new
Nicholas Rutherford

transforms appear to break pickle steps

Reported by Nicholas Rutherford | November 2nd, 2009 @ 08:49 PM

on registering the following in my steps

Transform /^the visitor menu$/ do |step_arg|
  "div[id='nav']"
end

Then /^within (the visitor menu) I should see a link to "(.*)" with text: "(.*)"$/ do |container, href, text|
  response.should have_selector(container) do |container|
    container.should have_selector("a", :href => href, :content => text)
  end
end

unrelated steps ceased working:

Given a service exists                               # features/step_definitions/pickle_steps.rb:4
  You have a nil object when you didn't expect it!
  The error occurred while evaluating nil.match (NoMethodError)
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/rb_support/rb_transform.rb:26:in `match'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/language_support/language_methods.rb:35:in `execute_transforms'
  /Users/nicholasrutherford/dev/workspace/ar_site/vendor/rails/activesupport/lib/active_support/whiny_nil.rb:55:in `detect'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/language_support/language_methods.rb:35:in `each'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/language_support/language_methods.rb:35:in `detect'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/language_support/language_methods.rb:35:in `execute_transforms'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/language_support/language_methods.rb:34:in `map'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/language_support/language_methods.rb:34:in `execute_transforms'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/rb_support/rb_step_definition.rb:54:in `invoke'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/step_match.rb:23:in `invoke'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/step_invocation.rb:58:in `invoke'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/step_invocation.rb:37:in `accept'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/tree_walker.rb:99:in `visit_step'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/tree_walker.rb:158:in `broadcast'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/tree_walker.rb:98:in `visit_step'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/step_collection.rb:15:in `accept'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/step_collection.rb:14:in `each'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/step_collection.rb:14:in `accept'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/tree_walker.rb:93:in `visit_steps'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/tree_walker.rb:158:in `broadcast'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/tree_walker.rb:92:in `visit_steps'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/scenario.rb:45:in `accept'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/step_mother.rb:191:in `before_and_after'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/scenario.rb:43:in `accept'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/scenario.rb:98:in `with_visitor'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/scenario.rb:37:in `accept'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/tree_walker.rb:51:in `visit_feature_element'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/tree_walker.rb:158:in `broadcast'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/tree_walker.rb:50:in `visit_feature_element'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/feature.rb:25:in `accept'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/feature.rb:24:in `each'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/feature.rb:24:in `accept'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/tree_walker.rb:20:in `visit_feature'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/tree_walker.rb:158:in `broadcast'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/tree_walker.rb:19:in `visit_feature'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/features.rb:29:in `accept'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/features.rb:17:in `each'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/features.rb:17:in `each'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/features.rb:28:in `accept'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/tree_walker.rb:14:in `visit_features'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/tree_walker.rb:158:in `broadcast'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/ast/tree_walker.rb:13:in `visit_features'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/cli/main.rb:55:in `execute!'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/../lib/cucumber/cli/main.rb:24:in `execute'
  /Users/nicholasrutherford/.gem/ruby/1.8/gems/cucumber-0.4.2/bin/cucumber:9
  /Users/nicholasrutherford/.gem/ruby/1.8/bin/cucumber:19:in `load'
  /Users/nicholasrutherford/.gem/ruby/1.8/bin/cucumber:19
  features/services/potential_client/view_services.feature:29:in `Given a service exists'

Commenting out the transform block, where it is the only transform in the project, makes the errors go away.

versions:

cucumber 0.4.2
pickle 0.1.21
machinist 1.0.5

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Assign tickets to <b>Ian White</b>, so I get notified

People watching this ticket

Pages