Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

pend specs with older versions of diff lcs

  • Loading branch information...
commit 11cc97423d20aa8d99b44bc8e5fbc14c03e93aa6 1 parent 1c6b10d
@JonRowe authored
View
7 spec/rspec/expectations/differ_spec.rb
@@ -39,7 +39,7 @@ module Expectations
end
if RUBY_VERSION.to_f > 1.9
- it 'copes with encoded strings' do
+ it 'copes with encoded strings', :pending => (Diff::LCS::VERSION < '1.2.2') do
@expected="Tu avec carté {count} itém has".encode('UTF-16LE')
@actual="Tu avec carte {count} item has".encode('UTF-16LE')
expect(subject).to eql(<<-EOD.encode('UTF-16LE'))
@@ -49,6 +49,11 @@ module Expectations
+Tu avec carté {count} itém has
EOD
end
+ it 'copes with encoded strings', :pending => (Diff::LCS::VERSION >= '1.2.2') do
+ @expected="Tu avec carté {count} itém has".encode('UTF-16LE')
+ @actual="Tu avec carte {count} item has".encode('UTF-16LE')
+ expect(subject).to eql 'Could not produce a diff because of the encoding of the string (UTF-16LE)'
+ end
it 'ouputs a message when encountering differently encoded strings' do
@expected="Tu avec carté {count} itém has".encode('UTF-16LE')
@actual="Tu avec carte {count} item has"
View
5 spec/rspec/expectations/fail_with_spec.rb
@@ -5,14 +5,15 @@
describe RSpec::Expectations, "#fail_with with diff of arrays" do
before { RSpec::Matchers.configuration.stub(:color? => false) }
- it "splits items with newlines" do
+ # Diff::LCS 1.2.2 required for this pattern
+ it "splits items with newlines", :pending => (Diff::LCS::VERSION < '1.2.2') do
expected_diff = "\nDiff:\n@@ -1,2 +1,4 @@\n+a\\nb\n+c\\nd\n \n"
expect {
RSpec::Expectations.fail_with("", [], ["a\nb", "c\nd"])
}.to fail_with(expected_diff)
end
- it "shows inner arrays on a single line" do
+ it "shows inner arrays on a single line", :pending => (Diff::LCS::VERSION < '1.2.2') do
expected_diff = "\nDiff:\n@@ -1,2 +1,4 @@\n+a\\nb\n+[\"c\\nd\"]\n \n"
expect {
RSpec::Expectations.fail_with("", [], ["a\nb", ["c\nd"]])
Please sign in to comment.
Something went wrong with that request. Please try again.