[rspec-users] have_text matcher does not support should_not.

Luis Lavena luislavena at gmail.com
Fri May 18 22:15:55 EDT 2007


Hello Guys,

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

Anyway, 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)

Just a bug? If so, I'm filling a a report at rubyforge.

Thanks in advance

-- 
Luis Lavena
Multimedia systems
-
Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi


More information about the rspec-users mailing list