Permalink
Browse files

Make sure to load test gems only in Devise test env

  • Loading branch information...
1 parent 112f499 commit eb7760b4b296e5203b5ed9e43b2b5c46661bdf8a @carlosantoniodasilva carlosantoniodasilva committed Nov 26, 2010
Showing with 14 additions and 8 deletions.
  1. +9 −4 Gemfile
  2. +2 −2 test/rails_app/config/boot.rb
  3. +3 −2 test/test_helper.rb
View
13 Gemfile
@@ -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"
@@ -7,7 +7,7 @@
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
@@ -9,8 +9,9 @@
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 @@
# 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 }

0 comments on commit eb7760b

Please sign in to comment.