spec/hamlit/engine/error_spec.rb in hamlit-0.3.3 vs spec/hamlit/engine/error_spec.rb in hamlit-0.3.4

- old
+ new

@@ -41,7 +41,16 @@ line_number = e.backtrace_locations.first.to_s.match(/:(\d+):/)[1] expect(line_number).to eq('8') end end end + + it 'raises syntax error for an inconsistent indentation' do + expect { render_string(<<-HAML.unindent) }. + %a + %b + \t\t%b + HAML + to raise_error(Hamlit::SyntaxError, 'Inconsistent indentation: 2 tabs used for indentation, but the rest of the document was indented using 2 spaces.') + end end end