Bundle and use spork to speed up specs by preloading rails env
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
||||
ENV['RAILS_ENV'] ||= 'test'
|
||||
require File.expand_path('../../config/environment', __FILE__)
|
||||
require 'rspec/rails'
|
||||
require 'spork'
|
||||
|
||||
# Requires supporting ruby files with custom matchers and macros, etc,
|
||||
# in spec/support/ and its subdirectories.
|
||||
Dir[Rails.root.join('spec/support/**/*.rb')].each {|f| require f}
|
||||
Spork.prefork do
|
||||
ENV['RAILS_ENV'] ||= 'test'
|
||||
require File.expand_path('../../config/environment', __FILE__)
|
||||
require 'rspec/rails'
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.mock_with :rspec
|
||||
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
||||
config.use_transactional_fixtures = true
|
||||
Dir[Rails.root.join('spec/support/**/*.rb')].each {|f| require f}
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.mock_with :rspec
|
||||
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
||||
config.use_transactional_fixtures = true
|
||||
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
|
||||
class Engine
|
||||
[:DEFAULT_COST, :MIN_COST].each do |sym|
|
||||
|
Reference in New Issue
Block a user