[rspec-users] [Cucumber] Bug?
Fedor Fomenko
lists at ruby-forum.com
Thu Apr 9 08:39:47 EDT 2009
Hello,
I have the following step for checking that a validation message is
displayed on screen:
Then /^(.+) should be displayed$/ do |error|
msg = @browser.ul(:class, 'validation-summary-errors').li(:text,
error)
#pp msg.text
msg.should_not == nil
end
I run scenario with examples table which contains expected error
messages. If I put wrong error message and pp line in step is commented
out as shown I get green result from Cucumber, which is wrong. When I
uncomment pp line I get exception
Unable to locate element, using :text, "BOOOOOOOOOO"
(Watir::Exception::UnknownObjectException)
./features/step_definitions/customer_details_steps.rb:47:in `/^(.+)
should be displayed$/'
features/customer_details_full.feature:40:in `Then <Error> should be
displayed'
And step is shown as Red in Cucumber as it should.
Is this a bug in Cucumber or am I missing something?
--
Posted via http://www.ruby-forum.com/.
More information about the rspec-users
mailing list