Sha256: 382c836df301eddce6e30d07c5e46aea1207e795a1882a5e4d731a1dfeba5366
Contents?: true
Size: 624 Bytes
Versions: 2
Compression:
Stored size: 624 Bytes
Contents
require "spec_helper" describe "StaticMatic::Template" do before do setup_staticmatic template_file = File.join(TEST_SITE_PATH, "src", "page_with_error.haml") begin @staticmatic.generate_html_from_template_source(File.read(template_file)) rescue Exception => e @template_error = StaticMatic::TemplateError.new(template_file, e) end end it "extract source around line number" do @template_error.source_extract.should match(/\- bang\!/) end it "extract line number from backtrace" do @template_error.line_number.should == "3" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
staticmatic3-2.1.10 | spec/template_error_spec.rb |
staticmatic3-2.1.9 | spec/template_error_spec.rb |