[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:01:49 EDT 2007
Bugs item #10923, was opened at 2007-05-19 00: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: Nobody (None)
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!
----------------------------------------------------------------------
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