From 72d11c4a4731a36ba863cede306859ebf5273bb0 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Wed, 7 Mar 2018 17:37:40 +0100 Subject: [PATCH 1/2] Fix tests on Ruby 2.5 --- spec/homesick_cli_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/homesick_cli_spec.rb b/spec/homesick_cli_spec.rb index 46a9762..5a2639c 100644 --- a/spec/homesick_cli_spec.rb +++ b/spec/homesick_cli_spec.rb @@ -739,6 +739,8 @@ describe Homesick::CLI do end it 'returns an error message when the $EDITOR environment variable is not set' do + # Return empty ENV, the test does not call it anyway + allow(ENV).to receive(:[]).and_return(nil) # Set the default editor to make sure it fails. allow(ENV).to receive(:[]).with('EDITOR').and_return(nil) expect(homesick).to receive('say_status').once @@ -747,6 +749,8 @@ describe Homesick::CLI do end it 'returns an error message when the given castle does not exist' do + # Return empty ENV, the test does not call it anyway + allow(ENV).to receive(:[]).and_return(nil) # Set a default just in case none is set allow(ENV).to receive(:[]).with('EDITOR').and_return('vim') allow(homesick).to receive('say_status').once From dcef34c17daf11084dc1379d3b8383f647b9b89f Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Thu, 8 Mar 2018 08:46:36 +0100 Subject: [PATCH 2/2] Run Travis tests on Ruby 2.5.0, too --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 3f9e004..46eb168 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: ruby rvm: + - 2.5.0 - 2.4.0 - 2.3.3 - 2.2.6