1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/test/generators/rails_controller_generator_test.rb

20 lines
617 B
Ruby

require 'generators/generator_test_helper'
class RailsControllerGeneratorTest < GeneratorTestCase
def test_controller_generates_controller
run_generator('controller', %w(products))
assert_generated_controller_for :products
assert_generated_functional_test_for :products
assert_generated_helper_for :products
end
def test_controller_generates_namespaced_controller
run_generator('controller', %w(admin::products))
assert_generated_controller_for "admin::products"
assert_generated_functional_test_for "admin::products"
assert_generated_helper_for "admin::products"
end
end