Allow --skip-routes to devise generator.

This commit is contained in:
José Valim
2011-09-14 16:51:46 -07:00
parent 98acc84111
commit 0b9a95e294
2 changed files with 10 additions and 1 deletions

View File

@@ -22,6 +22,12 @@ class DeviseGeneratorTest < Rails::Generators::TestCase
assert_file "config/routes.rb", match
end
test "route generation with skip routes" do
run_generator %w(monster name:string --skip-routes)
match = /devise_for :monsters, :skip => :all/
assert_file "config/routes.rb", match
end
def copy_routes
routes = File.expand_path("../../rails_app/config/routes.rb", __FILE__)
destination = File.join(destination_root, "config")