Sha256: 0b6cbf2c6b86d6b9b5a64fd5df688f5a312ee8ddac296f08f2746cbaea407de7
Contents?: true
Size: 1.1 KB
Versions: 26
Compression:
Stored size: 1.1 KB
Contents
require 'spec_helper' require 'generator_spec/test_case' describe Deface::Generators::OverrideGenerator do include GeneratorSpec::TestCase destination Dir.tmpdir before(:all) do prepare_destination end context 'using erb' do it "should generate a deface override with the correct path" do run_generator %w(posts/_post add_headline) assert_file 'app/overrides/posts/_post/add_headline.html.erb.deface', "<!-- insert_after 'h1' -->\n<h2>These robots are awesome.</h2>\n" end end context 'using haml' do it "should generate a deface override with the correct path" do run_generator %w(posts/_post add_headline -e haml) assert_file 'app/overrides/posts/_post/add_headline.html.haml.deface', "/\n insert_after 'h1'\n%h2 These robots are awesome.\n" end end context 'using slim' do it "should generate a deface override with the correct path" do run_generator %w(posts/_post add_headline -e slim) assert_file 'app/overrides/posts/_post/add_headline.html.slim.deface', "/\n insert_after 'h1'\nh2 These robots are awesome.\n" end end end
Version data entries
26 entries across 26 versions & 2 rubygems