Skip to content

Commit cea2b4e

Browse files
committed
Added test for no-rewrite-relative-paths.
1 parent 287bc4d commit cea2b4e

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
javascript_compressor: yui
2+
embed_assets: on
3+
rewrite_relative_paths: off
4+
5+
javascripts:
6+
js_test:
7+
- fixtures/src/*.js
8+
jst_test:
9+
- fixtures/src/*.jst
10+
11+
stylesheets:
12+
css_test:
13+
- fixtures/src/*.css

test/fixtures/jammed/css_test-no-rewrite-relative-paths.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/unit/test_configuration.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,11 @@ def test_environment_specific_configuration
7272
ENV['RAILS_ENV'] = 'test'
7373
end
7474

75+
def test_no_rewrite_relative_paths
76+
Jammit.load_configuration('test/config/assets-no-rewrite-relative-paths.yml')
77+
assert !Jammit.rewrite_relative_paths
78+
packed = @compressor.compress_css(glob('test/fixtures/src/*.css'))
79+
assert_equal packed, File.read('test/fixtures/jammed/css_test-no-rewrite-relative-paths.css')
80+
end
81+
7582
end

0 commit comments

Comments
 (0)