From 9893e674d2c86537a4e89e0c1dd97ac9eab2dc64 Mon Sep 17 00:00:00 2001 From: Jarl Friis Date: Thu, 16 May 2013 12:31:59 +0200 Subject: [PATCH] Taking care of ruby 1.8 where everything is binary --- lib/aruba/api.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/aruba/api.rb b/lib/aruba/api.rb index 241568de9..3826b123a 100644 --- a/lib/aruba/api.rb +++ b/lib/aruba/api.rb @@ -183,27 +183,27 @@ def all_output end def assert_exact_output(expected, actual) - actual.force_encoding(expected.encoding) + actual.force_encoding(expected.encoding) if RUBY_VERSION >= "1.9" unescape(actual).should == unescape(expected) end def assert_partial_output(expected, actual) - actual.force_encoding(expected.encoding) + actual.force_encoding(expected.encoding) if RUBY_VERSION >= "1.9" unescape(actual).should include(unescape(expected)) end def assert_matching_output(expected, actual) - actual.force_encoding(expected.encoding) + actual.force_encoding(expected.encoding) if RUBY_VERSION >= "1.9" unescape(actual).should =~ /#{unescape(expected)}/m end def assert_not_matching_output(expected, actual) - actual.force_encoding(expected.encoding) + actual.force_encoding(expected.encoding) if RUBY_VERSION >= "1.9" unescape(actual).should_not =~ /#{unescape(expected)}/m end def assert_no_partial_output(unexpected, actual) - actual.force_encoding(unexpected.encoding) + actual.force_encoding(unexpected.encoding) if RUBY_VERSION >= "1.9" if Regexp === unexpected unescape(actual).should_not =~ unexpected else