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

Make sure to load test gems only in Devise test env

This commit is contained in:
Carlos Antonio da Silva 2010-11-26 00:15:48 -02:00
parent 112f499937
commit eb7760b4b2
3 changed files with 14 additions and 8 deletions

13
Gemfile
View file

@ -3,18 +3,23 @@ source "http://rubygems.org"
gemspec
gem "rails", "~> 3.0.0"
gem "webrat", "0.7.2"
gem "mocha", :require => false
gem "oa-oauth", :require => "omniauth/oauth"
gem "oa-openid", :require => "omniauth/openid"
group :test do
gem "webrat", "0.7.2", :require => false
gem "mocha", :require => false
end
platforms :jruby do
gem 'activerecord-jdbcsqlite3-adapter'
end
platforms :ruby do
gem "sqlite3-ruby"
gem "ruby-debug", ">= 0.10.3" if RUBY_VERSION < '1.9'
group :test do
gem "sqlite3-ruby"
gem "ruby-debug", ">= 0.10.3" if RUBY_VERSION < '1.9'
end
group :mongoid do
gem "mongo", "1.1.2"

View file

@ -7,7 +7,7 @@ begin
rescue LoadError
require 'rubygems'
require 'bundler'
Bundler.setup :default, DEVISE_ORM
Bundler.setup :default, :test, DEVISE_ORM
end
$:.unshift File.expand_path('../../../../lib', __FILE__)
$:.unshift File.expand_path('../../../../lib', __FILE__)

View file

@ -9,8 +9,9 @@ require "rails/test_help"
require "orm/#{DEVISE_ORM}"
I18n.load_path << File.expand_path("../support/locale/en.yml", __FILE__)
require 'mocha'
require 'mocha'
require 'webrat'
Webrat.configure do |config|
config.mode = :rails
config.open_error_files = false
@ -20,4 +21,4 @@ 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 }
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }