1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

No need to use expand_path as we assume the test directory is in the .

This commit is contained in:
José Valim 2010-12-18 08:22:01 +01:00
parent a2e92a2ef2
commit b942520dc4
6 changed files with 14 additions and 10 deletions

View file

@ -1,6 +1,8 @@
require File.expand_path("../generators_test_helper", __FILE__)
require "test_helper"
if DEVISE_ORM == :active_record
require "generators/active_record/devise_generator"
class ActiveRecordGeneratorTest < Rails::Generators::TestCase
tests ActiveRecord::Generators::DeviseGenerator
destination File.expand_path("../../tmp", __FILE__)

View file

@ -1,5 +0,0 @@
require "rubygems"
require "rails/generators/test_case"
require File.expand_path("../../../lib/generators/devise/install_generator", __FILE__)
require File.expand_path("../../../lib/generators/devise/views_generator", __FILE__)
require File.expand_path("../../../lib/generators/#{DEVISE_ORM}/devise_generator", __FILE__)

View file

@ -1,4 +1,4 @@
require File.expand_path("../generators_test_helper", __FILE__)
require "test_helper"
class InstallGeneratorTest < Rails::Generators::TestCase
tests Devise::Generators::InstallGenerator

View file

@ -1,6 +1,8 @@
require File.expand_path("../generators_test_helper", __FILE__)
require "test_helper"
if DEVISE_ORM == :mongo_id
require "generators/mongo_id/devise_generator"
if DEVISE_ORM == :mongoid
class MongoidGeneratorTest < Rails::Generators::TestCase
tests Mongoid::Generators::DeviseGenerator
destination File.expand_path("../../tmp", __FILE__)

View file

@ -1,4 +1,4 @@
require File.expand_path("../generators_test_helper", __FILE__)
require "test_helper"
class ViewsGeneratorTest < Rails::Generators::TestCase
tests Devise::Generators::ViewsGenerator

View file

@ -22,3 +22,8 @@ Devise::OmniAuth.test_mode!
# Add support to load paths so we can overwrite broken webrat setup
$:.unshift File.expand_path('../support', __FILE__)
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
# For generators
require "rails/generators/test_case"
require "generators/devise/install_generator"
require "generators/devise/views_generator"