Skip to content

Commit b7b1275

Browse files
authored
Merge pull request #598 from yahonda/diag595
Address #595 by duplicating string objects
2 parents 0e2615f + 47d7440 commit b7b1275

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/actions/file_manipulation_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def file
139139

140140
it "accepts http remote sources" do
141141
body = "__start__\nHTTPFILE\n__end__\n"
142-
stub_request(:get, "http://example.com/file.txt").to_return(:body => body)
142+
stub_request(:get, "http://example.com/file.txt").to_return(:body => body.dup)
143143
action :get, "http://example.com/file.txt" do |content|
144144
expect(a_request(:get, "http://example.com/file.txt")).to have_been_made
145145
expect(content).to eq(body)
@@ -148,7 +148,7 @@ def file
148148

149149
it "accepts https remote sources" do
150150
body = "__start__\nHTTPSFILE\n__end__\n"
151-
stub_request(:get, "https://example.com/file.txt").to_return(:body => body)
151+
stub_request(:get, "https://example.com/file.txt").to_return(:body => body.dup)
152152
action :get, "https://example.com/file.txt" do |content|
153153
expect(a_request(:get, "https://example.com/file.txt")).to have_been_made
154154
expect(content).to eq(body)

0 commit comments

Comments
 (0)