From eb80c8c31b1fe02e3beb93afbd71a1ae57808b9a Mon Sep 17 00:00:00 2001 From: Philipe Fatio Date: Sun, 16 Oct 2022 22:19:25 +0200 Subject: [PATCH] Fix specs --- spec/integration/css_helper_spec.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/spec/integration/css_helper_spec.rb b/spec/integration/css_helper_spec.rb index af8032a..081e883 100644 --- a/spec/integration/css_helper_spec.rb +++ b/spec/integration/css_helper_spec.rb @@ -124,7 +124,9 @@ def expect_file(path, content='file content') .and_raise(TypeError) allow(Net::HTTP).to \ - receive(:get).with(uri).and_return(response) + receive(:get) + .with(uri, { 'Accept' => 'text/css' }) + .and_return(response) expect(css_for_url('http://example.com/assets/base.css')).to \ eq(response) end @@ -141,7 +143,9 @@ def expect_file(path, content='file content') .and_raise(Errno::ENOENT) allow(Net::HTTP).to \ - receive(:get).with(uri).and_return(response) + receive(:get) + .with(uri, { 'Accept' => 'text/css' }) + .and_return(response) expect(css_for_url('http://example.com/assets/base.css')).to \ eq(response) end @@ -183,7 +187,9 @@ def expect_file(path, content='file content') receive(:action_controller).and_return(config) allow(Net::HTTP).to \ - receive(:get).with(URI(url)).and_return(response) + receive(:get) + .with(URI(url), { 'Accept' => 'text/css' }) + .and_return(response) end it 'requests the file' do