[rspec-users] assert_select - to do negative tests - need help with syntax please :)

Gordon Yeong anexiole at gmail.com
Wed Oct 12 07:53:51 EDT 2011


>
> What _will_ work is this:
>
>  assert_select "input#brand_created_by", false
>
>
Hmmm. Sadly it does not work :( See below:

---------------- extract start -------------------------

     Failure/Error: assert_select "input#brand_created_by", false, :name =>
"brand[created_by]"
     ArgumentError:
       assertion message must be String or Proc, but Hash was given.
     # (eval):2:in `assert'
     # ./spec/views/brands/new.html.erb_spec.rb:37:in `block (3 levels) in
<top (required)>'
     # ./spec/views/brands/new.html.erb_spec.rb:34:in `block (2 levels) in
<top (required)

---------------- extract end  -------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20111012/59127ff3/attachment.html>


More information about the rspec-users mailing list