Skip to content
This repository has been archived by the owner on Oct 27, 2021. It is now read-only.

Commit

Permalink
back to 100% cov
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Jul 15, 2009
1 parent ce4498d commit 3502aff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/spec/expectations/fail_with_spec.rb
Expand Up @@ -57,6 +57,13 @@
}.should fail_with("the message\n\n Diff:diff")
end

it "should call differ if expected/actual are both hashes" do
@differ.should_receive(:diff_as_hash).and_return("diff")
lambda {
Spec::Expectations.fail_with "the message", {:a => :b}, {:a => 'b'}
}.should fail_with("the message\n\n Diff:diff")
end

it "should not call differ if expected or actual are procs" do
@differ.should_not_receive(:diff_as_string)
@differ.should_not_receive(:diff_as_object)
Expand Down

0 comments on commit 3502aff

Please sign in to comment.