Skip to content

Commit

Permalink
Specs: add tests for asset_pipeline.rb (#554)
Browse files Browse the repository at this point in the history
I enabled settings for test mode, which doesn't seem to noticeably
impact performance, but gives us a little bit more test coverage.
  • Loading branch information
mockdeep committed Mar 5, 2021
1 parent 7205144 commit bc1c359
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/asset_pipeline.rb
Expand Up @@ -22,13 +22,13 @@ def append_paths(app)
end

def configure_development(app)
app.configure :development do
app.configure :development, :test do
app.sprockets.cache = Sprockets::Cache::FileStore.new("./tmp")
end
end

def configure_production(app)
app.configure :production do
app.configure :production, :test do
app.sprockets.css_compressor = :scss
app.sprockets.js_compressor = :uglify
end
Expand Down
9 changes: 9 additions & 0 deletions spec/config/asset_pipeline_spec.rb
@@ -0,0 +1,9 @@
require "spec_helper"

describe "AssetPipeline" do
it "handles asset requests" do
get("/assets/stylesheets/application.css")

expect(last_response.body).to match("#feed-title")
end
end

0 comments on commit bc1c359

Please sign in to comment.