Damian Jones wrote:
> I was wondering what the correct procedure would be for spec'ing the
> following story line
> 
> When I pick "My Option" from "My Field"
> 
> "My Field" would be an Article Category select control, when running my
> feature the control does not have any data bound to it.
> 
> I am guessing I would somehow bind the control to some data in the
> corresponding Step
> 
> Am I going along the right lines, or can someone enlighten me with a
> better way of doing this?

Sounds right. You could use either a string in your when step.

When("I pick '$option' from my '$field'") do |option, field|
end

OR you could use a regular expression

When(/^I pick '(.*?)' from my '(.*?)'$/) do |option, field|
end

HTH
--
Joseph Wilk
http://www.joesniff.co.uk

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to