Skip to content

Commit c740ae4

Browse files
committed
Fix Sprockets 4 tests
Add required manifest files so we don't get exceptions. In sprockets 4 when you render a `.scss` file it will give you the raw file instead of the generated CSS. To fix tests we must generate css instead of scss.
1 parent 5f306d3 commit c740ae4

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//= link_tree ./images
2+
//= link_directory ../javascripts .js
3+
//= link_directory ../stylesheets .css
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//= link_tree ./images
2+
//= link_directory ../javascripts .js
3+
//= link_directory ../stylesheets .css
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//= link_tree ./images
2+
//= link_directory ../javascripts .js
3+
//= link_directory ../stylesheets .css

test/sass_rails_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class SassRailsTest < Sass::Rails::TestCase
144144

145145
test 'globbed imports work when new file is added' do
146146
project = 'scss_project'
147-
filename = 'application.scss'
147+
filename = 'application.css'
148148

149149
within_rails_app(project) do |tmpdir|
150150
asset_output(filename)
@@ -161,7 +161,7 @@ class SassRailsTest < Sass::Rails::TestCase
161161

162162
test 'globbed imports work when globbed file is changed' do
163163
project = 'scss_project'
164-
filename = 'application.scss'
164+
filename = 'application.css'
165165

166166
within_rails_app(project) do |tmpdir|
167167
asset_output(filename)

0 commit comments

Comments
 (0)