Sha256: fe5606d12c05fd71db6f335dda11b7527d78952f0c53d6a9e7a2e2581aa83adb
Contents?: true
Size: 1 KB
Versions: 16
Compression:
Stored size: 1 KB
Contents
require 'test_helper' require 'lib/generators/mustache/testing_helper' class Mustache::Generators::ControllerGeneratorTest < Rails::Generators::TestCase destination File.join(Rails.root) tests Rails::Generators::ControllerGenerator arguments %w(Account foo bar --template-engine mustache) setup :prepare_destination setup :copy_routes test "should generate mustache views" do run_generator assert_file "app/views/account/foo.rb" assert_file "app/views/account/bar.rb" end test "should generate mustache views as classes with scoped names extending Mustache::Rails" do run_generator assert_file "app/views/account/foo.rb", %r(class Account::Foo < Mustache::Rails) assert_file "app/views/account/bar.rb", %r(class Account::Bar < Mustache::Rails) end test "should generate mustache template files" do run_generator assert_file "app/templates/account/foo.html.mustache" assert_file "app/templates/account/bar.html.mustache" end end
Version data entries
16 entries across 16 versions & 1 rubygems