Sha256: ea24073e65b78d589d89af37ee8d11d6a7c4277694516021be5dc1ce80f02a4e
Contents?: true
Size: 1.26 KB
Versions: 20
Compression:
Stored size: 1.26 KB
Contents
require 'test_helper' class Shoulda::Generators::ControllerGeneratorTest < Rails::Generators::TestCase destination File.join(Rails.root) tests Rails::Generators::ControllerGenerator arguments %w(accounts index show new create edit update destroy --test-framework shoulda) setup :prepare_destination setup :copy_routes test "should invoke test framework" do run_generator assert_file "test/functional/accounts_controller_test.rb" end test "should create test class" do run_generator assert_file "test/functional/accounts_controller_test.rb" do |controller_test| assert_class "AccountsControllerTest", controller_test end end test "should create controller action tests" do run_generator assert_file "test/functional/accounts_controller_test.rb" do |controller_test| assert_class "AccountsControllerTest", controller_test do |klass| assert_match /context "index action"/, klass assert_match /context "show action"/, klass assert_match /context "new action"/, klass assert_match /context "create action"/, klass assert_match /context "edit action"/, klass assert_match /context "update action"/, klass assert_match /context "destroy action"/, klass end end end end
Version data entries
20 entries across 20 versions & 1 rubygems