diff --git a/test/generators/generators_test_helper.rb b/test/generators/generators_test_helper.rb new file mode 100644 index 00000000..d00b1002 --- /dev/null +++ b/test/generators/generators_test_helper.rb @@ -0,0 +1,3 @@ +require "rubygems" +require "rails/generators/test_case" +require File.join(File.dirname(__FILE__), "../../lib/generators/devise/install_generator") diff --git a/test/generators/install_generator_test.rb b/test/generators/install_generator_test.rb new file mode 100644 index 00000000..2f1e8555 --- /dev/null +++ b/test/generators/install_generator_test.rb @@ -0,0 +1,14 @@ +require File.join(File.dirname(__FILE__),"generators_test_helper.rb") + +class InstallGeneratorTest < Rails::Generators::TestCase + tests Devise::Generators::InstallGenerator + destination File.expand_path("../tmp", File.dirname(__FILE__)) + setup :prepare_destination + + test "Assert all files are properly created" do + run_generator + assert_file "config/initializers/devise.rb" + assert_file "config/locales/devise.en.yml" + end + +end