[rspec-users] webrat cannot find label?

James Byrne lists at ruby-forum.com
Fri Nov 14 15:45:42 EST 2008

James Byrne wrote:

> I'll be damned... It works.
> Thank you so very much. I would never have connected "option_text" to 
> the description portion of the list.

This is what I ended up with:

  Scenario: Attempt to ADD a VALID entity
    Given I am on the new entity page
    When I add a new entity correctly
      And I press "Create"
    Then I should see a success confirmation

Given /I am on the new entity page/ do
  visits "/entities/new"

When /I add a new entity correctly/ do
  fills_in("Common Name", :with => "My Common Name")
  fills_in("Full Legal Name", :with => "My Legal Name")
  selects("CORP - Corporation", :from => "Legal Form")

Then /I should see a success confirmation/ do
  response.body.should =~ /successfully created/m
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list