Permalink
Browse files

Revert "fix bug diffing single strings with multiline strings"

This reverts commit 07dd19c.
  • Loading branch information...
1 parent 07dd19c commit 2c23be33b19ae5aa9186270dca75cedabac1388c @dchelimsky dchelimsky committed Mar 17, 2012
Showing with 1 addition and 11 deletions.
  1. +1 −1 lib/rspec/matchers/built_in/include.rb
  2. +0 −10 spec/rspec/matchers/include_spec.rb
@@ -5,7 +5,7 @@ class Include
include BaseMatcher
def initialize(*expected)
- expected.length == 1 && String === expected.first ? super(expected.first) : super(expected)
+ super(expected)
end
def matches?(actual)
@@ -11,21 +11,11 @@
"abc".should include("a")
end
- it "passes if multiline target includes expected" do
- "\nabc\ndef".should include("a")
- end
-
it "fails if target does not include expected" do
lambda {
"abc".should include("d")
}.should fail_matching("expected \"abc\" to include \"d\"")
end
-
- it "fails if multiline target does not include expected" do
- lambda {
- "abc\ndef".should include("g")
- }.should raise_exception(/expected "abc\\ndef" to include "g"\nDiff/m)
- end
end
context "for an array target" do

0 comments on commit 2c23be3

Please sign in to comment.