Skip to content

Commit

Permalink
Fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
fphilipe committed Oct 16, 2022
1 parent d221928 commit eb80c8c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions spec/integration/css_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit eb80c8c

Please sign in to comment.