Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Metrics/LineLength - PARTIAL - 03 #1176

Merged
merged 1 commit into from
Aug 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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