From b3d3deb12f8308ccaff0fd9f7ac00ff6375d8554 Mon Sep 17 00:00:00 2001 From: stJhimy Date: Mon, 18 Oct 2010 17:27:21 -0200 Subject: [PATCH] Added test for Devise::Generators::InstallGenerator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- test/generators/generators_test_helper.rb | 3 +++ test/generators/install_generator_test.rb | 14 ++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 test/generators/generators_test_helper.rb create mode 100644 test/generators/install_generator_test.rb 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