Sha256: 079f375f6d6df8cca4f2874221d6bf7dff760f1fb2cef1bf776c53f787e6ed58

Contents?: true

Size: 1.03 KB

Versions: 12

Compression:

Stored size: 1.03 KB

Contents

require 'rubygems'
require 'bundler/setup'
unless ENV['CI']
  require 'pry-byebug'
end
# require 'simplecov'
# SimpleCov.start do

#end
ENV["lolita-env"] = "rails"

#Bundler.setup(:default,:rails,:test,:development)
require 'benchmark'
Benchmark.bm do |x|
  x.report("Loading ORM: ") do
    LOLITA_ORM = ENV["LOLITA_ORM"] || :active_record
    require "orm/#{LOLITA_ORM}"
  end
  if LOLITA_ORM == 'mongoid'
    require 'kaminari'
    Kaminari::Hooks.init
  end
  if ENV["lolita-env"] == "rails"
    x.report("Loading rails: ") do
      require 'rails'
      require 'lolita'
      Lolita.load!
      require 'rails_app/config/environment'
      require 'rspec/rails'
    end
  end

  x.report("Loading test stuff: ") do
    require 'ffaker'
  end
  x.report("Loading factories") do
    Dir["#{File.dirname(__FILE__)}/fabricators/**/*_fabricator.rb"].each {|f| require f}
  end
  Dir["#{File.dirname(__FILE__)}/support/**/*[^_spec].rb"].each {|f| require f}
  RSpec.configure do |config|
    config.mock_with :rspec
    config.order = "rand:3455"
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
lolita-4.0.11 spec/spec_helper.rb
lolita-4.0.10 spec/spec_helper.rb
lolita-4.0.9 spec/spec_helper.rb
lolita-4.0.8 spec/spec_helper.rb
lolita-4.0.7 spec/spec_helper.rb
lolita-4.0.6 spec/spec_helper.rb
lolita-4.0.5 spec/spec_helper.rb
lolita-4.0.4 spec/spec_helper.rb
lolita-4.0.3 spec/spec_helper.rb
lolita-4.0.2 spec/spec_helper.rb
lolita-4.0.1 spec/spec_helper.rb
lolita-4.0.0 spec/spec_helper.rb