Sha256: 069660eac65a33a0aaaa55880e161b56ba9c9bb1abb9d432847fd73e8b3d5403

Contents?: true

Size: 822 Bytes

Versions: 1

Compression:

Stored size: 822 Bytes

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

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
deface-1.0.0.rc2 spec/generators/deface/override_generator_spec.rb