spec/sprockets-sass_spec.rb in sprockets-sass-2.0.0.beta1 vs spec/sprockets-sass_spec.rb in sprockets-sass-2.0.0.beta2

- old
+ new

@@ -394,12 +394,12 @@ @assets.file 'asset_path.css.scss', %(div {\n color: red;\n}\n) res = compile_asset_and_return_compilation(@env, @public_dir, "asset_path.css") expect(res).to eql("div{color:red}\n") end end - + describe Sprockets::Sass::SassTemplate do let(:template) do Sprockets::Sass::SassTemplate.new(@assets.file 'bullet.gif') do # nothing @@ -408,18 +408,18 @@ describe 'initialize_engine' do it 'does add Sass functions if sprockets-helpers is not available' do Sprockets::Sass::SassTemplate.sass_functions_initialized = false Sprockets::Sass.add_sass_functions = true - Sprockets::Sass::SassTemplate.any_instance.should_receive(:require).with('sprockets/helpers').and_raise LoadError - Sprockets::Sass::SassTemplate.any_instance.should_not_receive(:require).with 'sprockets/sass/functions' + expect_any_instance_of(Sprockets::Sass::SassTemplate).to receive(:require).with('sprockets/helpers').and_raise LoadError + expect_any_instance_of(Sprockets::Sass::SassTemplate).to_not receive(:require).with 'sprockets/sass/functions' template expect(Sprockets::Sass::SassTemplate.engine_initialized?).to be_falsy end it 'does not add Sass functions if add_sass_functions is false' do Sprockets::Sass.add_sass_functions = false - template.should_not_receive(:require).with 'sprockets/sass/functions' + expect(template).to_not receive(:require).with 'sprockets/sass/functions' template.initialize_engine expect(Sprockets::Sass::SassTemplate.engine_initialized?).to be_falsy Sprockets::Sass.add_sass_functions = true end end