Skip to content

Commit

Permalink
Merge pull request #1176 from jaysonesmith/1021-fix-style-violations-6
Browse files Browse the repository at this point in the history
Fix Metrics/LineLength - PARTIAL - 03
  • Loading branch information
mxygem committed Aug 14, 2017
2 parents 7f35b2b + 61abd61 commit d7c3949
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
9 changes: 6 additions & 3 deletions features/lib/step_definitions/iso-8859-1_steps.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# encoding: iso-8859-1
# frozen_string_literal: true
# Ideally we would use Norwegian keywords here, but that won't work unless this file is UTF-8 encoded.
# Alternatively it would be possible to use Norwegian keywords and encode the file as UTF-8.
# Ideally we would use Norwegian keywords here, but that won't work unless this
# file is UTF-8 encoded.
# Alternatively, it would be possible to use Norwegian keywords and encode the
# file as UTF-8.
#
# In both cases, stepdef arguments will be sent in as UTF-8, regardless of what encoding is used.
# In both cases, stepdef arguments will be sent in as UTF-8, regardless of what
# encoding is used.
Given(/^jeg drikker en "([^"]*)"$/) do |drink|
expect(drink).to eq 'øl'.encode('UTF-8')
end
Expand Down
10 changes: 9 additions & 1 deletion features/lib/support/fake_wire_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,15 @@ def handle(data)
send_response(['fail', serialized_exception ].to_json)
end
rescue => e
send_response(['fail', { :message => e.message, :backtrace => e.backtrace, :exception => e.class } ].to_json)
response = [
'fail',
{
:message => e.message,
:backtrace => e.backtrace,
:exception => e.class
}
].to_json
send_response(response)
end

def response_to(data)
Expand Down

0 comments on commit d7c3949

Please sign in to comment.