Sha256: 44c80cb3c41eb389ff517a2a7be0d9b7f6b05daafe59038258df8503c5e0a8d8
Contents?: true
Size: 714 Bytes
Versions: 3
Compression:
Stored size: 714 Bytes
Contents
require 'test_helper' require 'rabl/generators' require 'rails/generators/resource_generator' require 'rails/generators/resource_template_generator' class Rails::Generators::ResourceTemplateGeneratorTest < Rails::Generators::TestCase destination File.join(Rails.root) tests Rails::Generators::ResourceGenerator arguments %w(account --actions index show) setup :prepare_destination setup :copy_routes test "should invoke template engine" do run_generator assert_file "app/views/accounts/show.rabl", %r(object @account) assert_file "app/views/accounts/index.rabl", %r(collection @accounts) assert_not_equal [], Dir.glob(File.join(Rails.root, "db/migrate/*create_account*")) end end
Version data entries
3 entries across 3 versions & 1 rubygems