[rspec-devel] [ rspec-Bugs-10923 ] have_text matcher does not support should_not

noreply at rubyforge.org noreply at rubyforge.org
Fri May 18 23:14:49 EDT 2007


Bugs item #10923, was opened at 2007-05-19 03:01
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=10923&group_id=797

Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Luis Lavena (luislavena)
>Assigned to: David Chelimsky (dchelimsky)
Summary: have_text matcher does not support should_not

Initial Comment:
Ruby: 1.8.5-p12 -mswin32
OS: Windows XP SP2
RSpec: 0.9.4
Rails: Edge (r6703)

Doing conversion of some test for some controllers, still with integrated views.

I have this:

 it "should not see Join This Group button on profile page as member" do
   get "show", :id => @group.id
   response.should be_success
   response.should_not have_text(/Join This Group/)
 end

But running with spec (0.9.4), drop me the folling error:

Matcher does not support should_not.
See Spec::Matchers for more information
about matchers.

Which is contradictory, since RDoc state otherwise:

http://rspec.rubyforge.org/rdoc-rails/classes/Spec/Rails/Matchers.html#M000014

response.should have_text(expected)
response.should_not have_text(expected)

Workaround:

response.should_not !have_text(expected)


Thanks guys for the work on rSpec!


----------------------------------------------------------------------

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-05-19 03:14

Message:
I've got this fixed but can't commit to svn from my current location. I'll commit it later tonight.

Cheers,
David

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=10923&group_id=797


More information about the rspec-devel mailing list