Bundle and use spork to speed up specs by preloading rails env
This commit is contained in:
parent
7187266982
commit
7350c1e17d
1
Gemfile
1
Gemfile
@ -14,4 +14,5 @@ group :development, :test do
|
|||||||
gem 'capybara'
|
gem 'capybara'
|
||||||
gem 'database_cleaner'
|
gem 'database_cleaner'
|
||||||
gem 'factory_girl_rails'
|
gem 'factory_girl_rails'
|
||||||
|
gem 'spork', '~> 0.9.0.rc'
|
||||||
end
|
end
|
||||||
|
@ -113,6 +113,7 @@ GEM
|
|||||||
ffi (>= 1.0.7)
|
ffi (>= 1.0.7)
|
||||||
json_pure
|
json_pure
|
||||||
rubyzip
|
rubyzip
|
||||||
|
spork (0.9.0.rc9)
|
||||||
sqlite3 (1.3.3)
|
sqlite3 (1.3.3)
|
||||||
term-ansicolor (1.0.5)
|
term-ansicolor (1.0.5)
|
||||||
thor (0.14.6)
|
thor (0.14.6)
|
||||||
@ -134,4 +135,5 @@ DEPENDENCIES
|
|||||||
haml
|
haml
|
||||||
rails (= 3.0.9)
|
rails (= 3.0.9)
|
||||||
rspec-rails
|
rspec-rails
|
||||||
|
spork (~> 0.9.0.rc)
|
||||||
sqlite3
|
sqlite3
|
||||||
|
@ -1,16 +1,19 @@
|
|||||||
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
require 'spork'
|
||||||
ENV['RAILS_ENV'] ||= 'test'
|
|
||||||
require File.expand_path('../../config/environment', __FILE__)
|
|
||||||
require 'rspec/rails'
|
|
||||||
|
|
||||||
# Requires supporting ruby files with custom matchers and macros, etc,
|
Spork.prefork do
|
||||||
# in spec/support/ and its subdirectories.
|
ENV['RAILS_ENV'] ||= 'test'
|
||||||
Dir[Rails.root.join('spec/support/**/*.rb')].each {|f| require f}
|
require File.expand_path('../../config/environment', __FILE__)
|
||||||
|
require 'rspec/rails'
|
||||||
|
|
||||||
RSpec.configure do |config|
|
Dir[Rails.root.join('spec/support/**/*.rb')].each {|f| require f}
|
||||||
config.mock_with :rspec
|
|
||||||
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
RSpec.configure do |config|
|
||||||
config.use_transactional_fixtures = true
|
config.mock_with :rspec
|
||||||
|
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
||||||
|
config.use_transactional_fixtures = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
load "#{Rails.root.to_s}/db/schema.rb"
|
Spork.each_run do
|
||||||
|
load "#{Rails.root.to_s}/db/schema.rb"
|
||||||
|
end
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
require 'bcrypt'
|
||||||
|
|
||||||
module BCrypt
|
module BCrypt
|
||||||
class Engine
|
class Engine
|
||||||
[:DEFAULT_COST, :MIN_COST].each do |sym|
|
[:DEFAULT_COST, :MIN_COST].each do |sym|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user