Skip to content

Commit

Permalink
fixed example for include_text matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Mar 17, 2008
1 parent 2dd2e9f commit deaa80d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rspec_on_rails/spec/rails/matchers/include_text_spec.rb
Expand Up @@ -49,9 +49,15 @@

it "should fail when a template is rendered" do
post 'some_action'
failure_message = case mode
when 'isolation'
/expected to find \"this is the text for this action\" in \"render_spec\/some_action\"/
when 'integration'
/expected to find \"this is the text for this action\" in \"\"/
end
lambda {
response.should include_text("this is the text for this action")
}.should fail_with(/expected to find \"this is the text for this action\" in \"render_spec\/some_action\"/)
}.should fail_with(failure_message)
end

it "should pass using should_not with incorrect text" do
Expand Down

0 comments on commit deaa80d

Please sign in to comment.