Skip to content

Commit

Permalink
Add failing test for a mimic of production mode
Browse files Browse the repository at this point in the history
  • Loading branch information
timhaines committed Feb 7, 2016
1 parent 5b16c6c commit 71d3531
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion test/compass_rails_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,23 @@
assert_equal "public/stylesheets", project.rails_property("compass.css_dir")
end
end unless ENV['DEBUG_COMPILE']
end

it "compiles when in production mode" do
within_rails_app('test_railtie') do |project|
project.setup_asset_fixtures!

# Mimic Rails production mode
project.set_rails('assets.compile', false)

assert project.boots?

project.precompile!

project.compiled_stylesheet 'public/assets/application*.css' do |css|
refute css.empty?
assert_match 'body container', css
assert_match '.numbers-sprite-1', css
end
end
end
end

0 comments on commit 71d3531

Please sign in to comment.