Andrew Premdas wrote: > What you're doing here is writing imperative features. Writing > declarative features might be a better alternative. Instead of ... > > Given I am on the new entity page > When I correctly fill in the new entity form > Then I should see a confirmation > > Then the feature has much less technical stuff in it that > > 1) Hide the intent > 2) Make the story brittle to cosmetic changes, in particular to small > rewordings of error messages and confirmations > > A side effect of this is you need much less regex magic to match your > expressions. >
This advice does help. Thank you. Is there a way to mix webrat and hard coded steps? In other words, if I have this in my steps file. Given /I am on the new entity page/ do visits "/entities/new" end When /I fill out the form correctly/ do fills_in("Common Name", :with => "My Common Name") fills_in("Legal Name", :with => "My Legal Name") Entity.entity_legal_name = "CORP" # does not work end Is this possible? How do I set the attribute "entity_legal_form" to "CORP" for that entity? I cannot figure out how to reference that entity instance. -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users