Luis Lavena
2007-May-19 02:15 UTC
[rspec-users] have_text matcher does not support should_not.
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
David Chelimsky
2007-May-19 02:36 UTC
[rspec-users] have_text matcher does not support should_not.
On 5/18/07, Luis Lavena <luislavena at gmail.com> wrote:> 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.Just a bug. Please file.> > 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 > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Luis Lavena
2007-May-19 02:53 UTC
[rspec-users] have_text matcher does not support should_not.
On 5/18/07, David Chelimsky <dchelimsky at gmail.com> wrote:> On 5/18/07, Luis Lavena <luislavena at gmail.com> wrote:[...]> > > > response.should have_text(expected) > > response.should_not have_text(expected) > > > > Just a bug? If so, I''m filling a a report at rubyforge. > > Just a bug. Please file. >Ok, until gets fixed: response.should_not !have_text(/Join This Group/) -- 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