Sha256: caeed3bac028830e0e419cc3b8fffccb92c7665a2613319ec5094e370c9ddedd

Contents?: true

Size: 884 Bytes

Versions: 1

Compression:

Stored size: 884 Bytes

Contents

require 'test_helper'

class Bootstrap::Generators::InstallGeneratorTest < ::Rails::Generators::TestCase
  destination File.join(Rails.root)
  tests Bootstrap::Generators::InstallGenerator

  setup :prepare_destination
  setup :copy_routes

  test "should copy controller erb templates" do
    run_generator

    assert_file "lib/templates/erb/controller/view.html.erb"
  end

  test "should copy controller haml templates" do
    run_generator

    assert_file "lib/templates/haml/controller/view.html.haml"
  end

  test "should copy scaffold erb templates" do
    run_generator

    %w(index edit new show _form).each { |view| assert_file "lib/templates/erb/scaffold/#{view}.html.erb" }
  end

  test "should copy scaffold haml templates" do
    run_generator

    %w(index edit new show _form).each { |view| assert_file "lib/templates/haml/scaffold/#{view}.html.haml" }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bootstrap-generators-0.0.5 test/lib/generators/bootstrap/install_generator_test.rb