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

Version Path
deface-1.9.0 spec/generators/deface/override_generator_spec.rb
deface-1.8.2 spec/generators/deface/override_generator_spec.rb
deface-1.8.1 spec/generators/deface/override_generator_spec.rb
deface-1.8.0 spec/generators/deface/override_generator_spec.rb
deface-1.7.0 spec/generators/deface/override_generator_spec.rb
deface-1.6.2 spec/generators/deface/override_generator_spec.rb
deface-1.6.1 spec/generators/deface/override_generator_spec.rb
deface-1.6.0 spec/generators/deface/override_generator_spec.rb
deface-1.5.3 spec/generators/deface/override_generator_spec.rb
deface-1.5.2 spec/generators/deface/override_generator_spec.rb
deface-1.5.1 spec/generators/deface/override_generator_spec.rb
deface-1.5.0 spec/generators/deface/override_generator_spec.rb
deface-1.4.0 spec/generators/deface/override_generator_spec.rb
deface-1.3.2 spec/generators/deface/override_generator_spec.rb
deface-1.3.1 spec/generators/deface/override_generator_spec.rb
deface-1.3.0 spec/generators/deface/override_generator_spec.rb
deface-1.2.0 spec/generators/deface/override_generator_spec.rb
deface-1.1.0 spec/generators/deface/override_generator_spec.rb
deface-1.0.2 spec/generators/deface/override_generator_spec.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/deface-1.0.1/spec/generators/deface/override_generator_spec.rb