[rspec-users] RSpec story failing because create is not rendering 'show'
Zach Dennis
zach.dennis at gmail.com
Tue Sep 16 18:43:03 EDT 2008
On Sat, Sep 13, 2008 at 2:24 PM, Damian Jones <lists at ruby-forum.com> wrote:
> Ok I got my story to pass by changing the follwing snippet
>
> When /I create a product named (.*) described with (.*)/ do |name,
> description|
> visits new_product_path
> fills_in "product[name]", :with => name
> fills_in "product[description]", :with => description
> clicks_button "Create"
> end
>
> don't know why it doesn't work with this:
>
> fills_in :name, :with => name
>
> Webrat api specs say it should
No it doesn't. It says that the first argument is considered as an
HTML id, name or label. The id is product_name. The name is
product[name] and I can't tell from what you posted if you have a
label "name".
http://github.com/brynary/webrat/tree/master/lib/webrat/core/scope.rb
Zach
--
Zach Dennis
http://www.continuousthinking.com
http://www.mutuallyhuman.com
More information about the rspec-users
mailing list