From 61abd61fc1818ae2a9d280a33a64aa7c2cf390fd Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Thu, 10 Aug 2017 17:13:05 -0700 Subject: [PATCH] Fix Metrics/LineLength - PARTIAL - 03 * Fixing features directory * Offenses: 3 --- features/lib/step_definitions/iso-8859-1_steps.rb | 9 ++++++--- features/lib/support/fake_wire_server.rb | 10 +++++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/features/lib/step_definitions/iso-8859-1_steps.rb b/features/lib/step_definitions/iso-8859-1_steps.rb index c75c6e30a5..c30a9e2d29 100644 --- a/features/lib/step_definitions/iso-8859-1_steps.rb +++ b/features/lib/step_definitions/iso-8859-1_steps.rb @@ -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 diff --git a/features/lib/support/fake_wire_server.rb b/features/lib/support/fake_wire_server.rb index 0fc1119cdb..d72d2b4479 100644 --- a/features/lib/support/fake_wire_server.rb +++ b/features/lib/support/fake_wire_server.rb @@ -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)