Sha256: 5b9237117299530540cfbf9de8ec81c099dd06ccda6de938b7e0645084a72357

Contents?: true

Size: 1013 Bytes

Versions: 20

Compression:

Stored size: 1013 Bytes

Contents

ENV["RAILS_ENV"] ||= 'test'

require 'simplecov'
require 'coveralls'

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
    SimpleCov::Formatter::HTMLFormatter,
    Coveralls::SimpleCov::Formatter
]

SimpleCov.start 'rails'

ENGINE_RAILS_ROOT = File.join(File.dirname(__FILE__), '../') unless defined?(ENGINE_RAILS_ROOT)

require File.expand_path("../dummy/config/environment", __FILE__)

require 'rspec/rails'
require 'capybara/rails'
require 'capybara/rspec'
require 'database_cleaner'

include Warden::Test::Helpers
Warden.test_mode!

Rails.backtrace_cleaner.remove_silencers!

Dir[File.join(ENGINE_RAILS_ROOT, 'spec/support/**/*.rb')].each {|f| require f}

RSpec.configure do |config|
  config.use_transactional_fixtures = 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

  config.mock_with :rspec
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
constructor-cms-0.8.4 spec/spec_helper.rb
constructor-cms-0.8.3 spec/spec_helper.rb
constructor-cms-0.8.2 spec/spec_helper.rb
constructor-cms-0.8.1 spec/spec_helper.rb
constructor-cms-0.8.0 spec/spec_helper.rb
constructor-cms-0.7.10 spec/spec_helper.rb
constructor-cms-0.7.9 spec/spec_helper.rb
constructor-cms-0.7.8 spec/spec_helper.rb
constructor-cms-0.7.7 spec/spec_helper.rb
constructor-cms-0.7.6 spec/spec_helper.rb
constructor-cms-0.7.5 spec/spec_helper.rb
constructor-cms-0.7.4 spec/spec_helper.rb
constructor-pages-0.7.3 spec/spec_helper.rb
constructor-core-0.7.3 spec/spec_helper.rb
constructor-cms-0.7.3 spec/spec_helper.rb
constructor-pages-0.7.2 spec/spec_helper.rb
constructor-core-0.7.2 spec/spec_helper.rb
constructor-cms-0.7.2 spec/spec_helper.rb
constructor-core-0.7.1 spec/spec_helper.rb
constructor-cms-0.7.0 spec/spec_helper.rb