diff --git a/spec/rails_spec.rb b/spec/rails_spec.rb index 58b188f..d758c89 100644 --- a/spec/rails_spec.rb +++ b/spec/rails_spec.rb @@ -35,6 +35,7 @@ it 'compress the output if Rails is configured to compress them too' do result = fixture(:compressed).last + result.rstrip! # because of modern text editors automatically adding new lines at the end of file app = create_app(:compress => true) app.assets['compressed'].to_s.should == result diff --git a/spec/stylus_spec.rb b/spec/stylus_spec.rb index c034bd6..aaaead1 100644 --- a/spec/stylus_spec.rb +++ b/spec/stylus_spec.rb @@ -14,12 +14,14 @@ it 'compress the file when the "compress" flag is given' do input, output = fixture(:compressed) + output.rstrip! # because of modern text editors automatically adding new lines at the end of file expect(Stylus.compile(input, compress: true)).to eq(output) end it 'handles the compress flag globally' do Stylus.compress = true input, output = fixture(:compressed) + output.rstrip! # because of modern text editors automatically adding new lines at the end of file expect(Stylus.compile(input)).to eq(output) end diff --git a/spec/tilt/stylus_spec.rb b/spec/tilt/stylus_spec.rb index 7f127d3..7328ca7 100644 --- a/spec/tilt/stylus_spec.rb +++ b/spec/tilt/stylus_spec.rb @@ -19,6 +19,7 @@ it 'compiles with the compress option' do input, output = fixture(:compressed) template = Tilt::StylusTemplate.new(compress: true) { |_| input } + output.rstrip! # because of modern text editors automatically adding new lines at the end of file expect(template.render).to eq(output) end end