Skip to content

Commit

Permalink
Merge pull request #462 from cucumber/feature/fix-utf-8-issue
Browse files Browse the repository at this point in the history
Fix UTF-8 issues with jRuby. Closes #417.
  • Loading branch information
maxmeyer authored Jul 26, 2017
2 parents f4317b5 + b5ee064 commit 501bbdc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/aruba/matchers/string/include_output_string.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# end
RSpec::Matchers.define :include_output_string do |expected|
match do |actual|
actual.force_encoding('UTF-8')
@expected = Regexp.new(Regexp.escape(sanitize_text(expected.to_s)), Regexp::MULTILINE)
@actual = sanitize_text(actual)

Expand Down
1 change: 1 addition & 0 deletions lib/aruba/matchers/string/match_output_string.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# end
RSpec::Matchers.define :match_output_string do |expected|
match do |actual|
actual.force_encoding('UTF-8')
@expected = Regexp.new(unescape_text(expected), Regexp::MULTILINE)
@actual = sanitize_text(actual)

Expand Down
1 change: 1 addition & 0 deletions lib/aruba/matchers/string/output_string_eq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# end
RSpec::Matchers.define :output_string_eq do |expected|
match do |actual|
actual.force_encoding('UTF-8')
@expected = sanitize_text(expected.to_s)
@actual = sanitize_text(actual.to_s)

Expand Down

0 comments on commit 501bbdc

Please sign in to comment.