spec/rails/spec/requests/faml_spec.rb in faml-0.2.6 vs spec/rails/spec/requests/faml_spec.rb in faml-0.2.7

- old
+ new

@@ -67,7 +67,39 @@ expect { get '/books/indent_error' }.to raise_error { |e| expect(e.backtrace[0]).to end_with('app/views/books/indent_error.html.haml:3') } end end + + describe Faml::Compiler::UnparsableRubyCode do + it 'has proper backtrace' do + expect { get '/books/unparsable' }.to raise_error { |e| + expect(e.backtrace[0]).to end_with('app/views/books/unparsable.html.haml:2') + } + end + end + + describe Faml::FilterCompilers::NotFound do + it 'has proper backtrace' do + expect { get '/books/filter_not_found' }.to raise_error { |e| + expect(e.backtrace[0]).to end_with('app/views/books/filter_not_found.html.haml:2') + } + end + end + + describe Faml::TextCompiler::InvalidInterpolation do + it 'has proper backtrace' do + expect { get '/books/invalid_interpolation' }.to raise_error { |e| + expect(e.backtrace[0]).to end_with('app/views/books/invalid_interpolation.html.haml:3') + } + end + + context 'inside filter' do + it 'has proper backtrace' do + expect { get '/books/filter_invalid_interpolation' }.to raise_error { |e| + expect(e.backtrace[0]).to end_with('app/views/books/filter_invalid_interpolation.html.haml:4') + } + end + end + end end end