spec/lib/sprockets/processor_spec.rb in opal-0.10.3 vs spec/lib/sprockets/processor_spec.rb in opal-0.10.4

- old
+ new

@@ -43,26 +43,26 @@ let(:stubbed_file) { 'foo' } let(:template) { described_class.new { |t| "require #{stubbed_file.inspect}" } } let(:config) { Opal::Config } it 'usually require files' do - sprockets_context.should_receive(:require_asset).with(stubbed_file) + expect(sprockets_context).to receive(:require_asset).with(stubbed_file) template.render(sprockets_context) end it 'skips require of stubbed file' do config.stubbed_files << stubbed_file.to_s - sprockets_context.should_not_receive(:require_asset).with(stubbed_file) + expect(sprockets_context).not_to receive(:require_asset).with(stubbed_file) template.render(sprockets_context) end it 'marks a stubbed file as loaded' do config.stubbed_files << stubbed_file.to_s asset = double(dependencies: [], pathname: Pathname('bar'), logical_path: 'bar') environment.stub(:[]).with('bar.js') { asset } environment.stub(:engines) { {'.rb' => described_class, '.opal' => described_class} } - code = ::Opal::Sprockets.load_asset('bar', environment) + code = ::Opal::Sprockets.load_asset('bar') code.should match stubbed_file end end describe '.cache_key' do