Skip to content

Commit

Permalink
Fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyshields committed Jan 2, 2025
1 parent f30447e commit 830e2da
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/sassc_rails_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,15 @@ def test_globbed_imports_work_when_globbed_file_is_changed
assert_match(/new-file-test/, css_output)
refute_match(/changed-file-test/, css_output)

File.open(new_file, 'w') do |file|
File.open(new_file, 'a') do |file|
file.puts '.changed-file-test { color: #000; }'
end

# Must clear the cache if the file is modified
Rails.application.assets.cache.clear

new_css_output = render_asset('glob_test.css')
assert_match(/new-file-test/, css_output)
assert_match(/new-file-test/, new_css_output)
assert_match(/changed-file-test/, new_css_output)
refute_equal css_output, new_css_output
ensure
Expand Down

0 comments on commit 830e2da

Please sign in to comment.