Sha256: 93a08a752ed4700260ced5f7c8e41f4b51462c0b43a40b27a2f3e68cf76e0806

Contents?: true

Size: 1.14 KB

Versions: 5

Compression:

Stored size: 1.14 KB

Contents

# Track code coverage
require 'simplecov'
 SimpleCov.start 'rails' do
  # root "dummy/"
  add_filter "/factories/"
end

# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] = 'test'
require File.expand_path("../dummy/config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
require 'database_cleaner'
require 'shoulda'
require 'factory_girl'
require 'mocha'
require 'capybara/rspec'
require 'capybara/rails'

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

RSpec.configure do |config|
  config.mock_with :mocha
  config.use_transactional_fixtures = true
  config.infer_base_class_for_anonymous_controllers = false

  config.before(:suite) do
    DatabaseCleaner.strategy = :transaction
    DatabaseCleaner.clean_with(:truncation)
  end

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

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tb_media-1.0.8 spec/spec_helper.rb
tb_media-1.0.6 spec/spec_helper.rb
tb_media-1.0.5 spec/spec_helper.rb
tb_media-1.0.4 spec/spec_helper.rb
tb_media-1.0.3 spec/spec_helper.rb