Skip to content

Commit 9f522f9

Browse files
committedApr 13, 2015
Not sure why, but sprockets3 appends “.self”
1 parent b5c48be commit 9f522f9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed
 

Diff for: ‎spec/lib/sprockets/server_spec.rb

+10-2
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,22 @@ def app
2222
end
2323

2424
it 'serves assets with complex sprockets requires' do
25-
assets = app.sprockets['complex_sprockets'].to_a.map(&:logical_path)
25+
asset = app.sprockets['complex_sprockets']
26+
expect(asset).to be_truthy
27+
28+
assets = asset.to_a.map do |sub_asset|
29+
sub_asset.logical_path.gsub(/\.self\.js$/, '.js')
30+
end
31+
2632
%w[
2733
no_requires.js
2834
jst_file.js
2935
required_tree_test/required_file1.js
3036
required_tree_test/required_file2.js
3137
file_with_directives.js
32-
].each { |logical_path| expect(assets).to include(logical_path) }
38+
].each do |logical_path|
39+
expect(assets).to include(logical_path)
40+
end
3341
end
3442

3543
describe 'source maps' do

0 commit comments

Comments
 (0)
Please sign in to comment.