diff options
Diffstat (limited to 'spec/bundler/bundler/bundler_spec.rb')
-rw-r--r-- | spec/bundler/bundler/bundler_spec.rb | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/spec/bundler/bundler/bundler_spec.rb b/spec/bundler/bundler/bundler_spec.rb index 56ef4ce75a..d164b5d3c6 100644 --- a/spec/bundler/bundler/bundler_spec.rb +++ b/spec/bundler/bundler/bundler_spec.rb @@ -249,11 +249,8 @@ EOF allow(Bundler.rubygems).to receive(:user_home).and_return(path) allow(File).to receive(:directory?).with(path).and_return false allow(Bundler).to receive(:tmp).and_return(Pathname.new("/tmp/trulyrandom")) - message = <<EOF -`/home/oggy` is not a directory. -Bundler will use `/tmp/trulyrandom' as your home directory temporarily. -EOF - expect(Bundler.ui).to receive(:warn).with(message) + expect(Bundler.ui).to receive(:warn).with("`/home/oggy` is not a directory.\n") + expect(Bundler.ui).to receive(:warn).with("Bundler will use `/tmp/trulyrandom' as your home directory temporarily.\n") expect(Bundler.user_home).to eq(Pathname("/tmp/trulyrandom")) end end @@ -268,11 +265,8 @@ EOF allow(File).to receive(:writable?).with(path).and_return false allow(File).to receive(:directory?).with(dotbundle).and_return false allow(Bundler).to receive(:tmp).and_return(Pathname.new("/tmp/trulyrandom")) - message = <<EOF -`/home/oggy` is not writable. -Bundler will use `/tmp/trulyrandom' as your home directory temporarily. -EOF - expect(Bundler.ui).to receive(:warn).with(message) + expect(Bundler.ui).to receive(:warn).with("`/home/oggy` is not writable.\n") + expect(Bundler.ui).to receive(:warn).with("Bundler will use `/tmp/trulyrandom' as your home directory temporarily.\n") expect(Bundler.user_home).to eq(Pathname("/tmp/trulyrandom")) end @@ -293,11 +287,8 @@ EOF it "should issue warning and return a temporary user home" do allow(Bundler.rubygems).to receive(:user_home).and_return(nil) allow(Bundler).to receive(:tmp).and_return(Pathname.new("/tmp/trulyrandom")) - message = <<EOF -Your home directory is not set. -Bundler will use `/tmp/trulyrandom' as your home directory temporarily. -EOF - expect(Bundler.ui).to receive(:warn).with(message) + expect(Bundler.ui).to receive(:warn).with("Your home directory is not set.\n") + expect(Bundler.ui).to receive(:warn).with("Bundler will use `/tmp/trulyrandom' as your home directory temporarily.\n") expect(Bundler.user_home).to eq(Pathname("/tmp/trulyrandom")) end end |