[rspec-users] cucumber/rspec pending call

Joseph Wilk josephwilk at joesniff.co.uk
Tue Dec 2 13:16:51 EST 2008


James Byrne wrote:
> I have tried to do this in a step definition:
>
> When /set the "(.*)" to "(.*)"/ do |a,v|
>   pending
> end
>
> However, no matter how I invoke cucumber, I get this error:
>
>     And I set the "type" to "main"                        #
> features/locations/step_definitions/location_steps.rb:33
>       TODO (Spec::Example::ExamplePendingError)
>       /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/example/pending.rb:13:in
> `pending'
>       ./features/locations/step_definitions/location_steps.rb:34:in `And
> /set the "(.*)" to "(.*)"/'
>       features/locations/location.feature:24:in `And I set the "type" to
> "main"'
>
> My env.rb file looks like this:
>
> # Sets up the Rails environment for Cucumber
> ENV["RAILS_ENV"] = "test"
> require File.expand_path(File.dirname(__FILE__) +
> '/../../config/environment')
> require 'cucumber/rails/world'
> Cucumber::Rails.use_transactional_fixtures
>
> # If webrat is a gem then uncomment this
> require 'webrat' if !defined?(Webrat)
>
> # If webrat is a plugin then uncomment this
> #require 'webrat/rails'
>
> # Comment out the next two lines if you're not using RSpec's matchers
> (should / should_not) in your steps.
> require 'cucumber/rails/rspec'
> #require 'webrat/rspec-rails'
>   
'pending' is not supported yet.

There is some work waiting to be done on pending steps:
http://rspec.lighthouseapp.com/projects/16211/tickets/52-unmatched-steps-should-less-tolerable-than-pending-steps

But I think it could do with a new ticket. Would you mind creating one 
please?

Thanks,
--
Joseph Wilk
http://blog.josephwilk.net


More information about the rspec-users mailing list