Sha256: 934a7e85de1c69a171bf48d2d142fefc411f5a767d0d8c46fac9e2b10d62191c

Contents?: true

Size: 965 Bytes

Versions: 9

Compression:

Stored size: 965 Bytes

Contents

require 'rubygems'
require 'bundler'

require 'rspec'

require 'factory_girl'
require 'database_cleaner'

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))

require 'locomotive_plugins'

# Set up mongoid
Mongoid.configure do |config|
  config.master = Mongo::Connection.new.db('locomotive_plugins_test')
end

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|f| require f}

RSpec.configure do |config|
  config.mock_with :mocha

   # Use color in STDOUT
  config.color_enabled = true

  config.before(:suite) do
    DatabaseCleaner.strategy = :truncation
    DatabaseCleaner.orm = 'mongoid'
  end

  config.before(:each) do
    Mongoid::IdentityMap.clear
  end

  config.before(:each) do
    DatabaseCleaner.clean
  end

  config.after(:suite) do
    DatabaseCleaner.clean
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
locomotive_plugins-1.0.0.beta10 spec/spec_helper.rb
locomotive_plugins-1.0.0.beta9 spec/spec_helper.rb
locomotive_plugins-1.0.0.beta8 spec/spec_helper.rb
locomotive_plugins-1.0.0.beta7 spec/spec_helper.rb
locomotive_plugins-1.0.0.beta6 spec/spec_helper.rb
locomotive_plugins-1.0.0.beta5 spec/spec_helper.rb
locomotive_plugins-1.0.0.beta4 spec/spec_helper.rb
locomotive_plugins-1.0.0.beta3 spec/spec_helper.rb
locomotive_plugins-1.0.0.beta2 spec/spec_helper.rb