Sha256: 48eaf9966c8f4d1286e38537aac26b0c5d32e1baa74016a99ef2ccad87634447

Contents?: true

Size: 824 Bytes

Versions: 55

Compression:

Stored size: 824 Bytes

Contents

ENV["RAILS_ENV"] ||= 'test'
require 'spec_helper'
require File.expand_path("../dummy/config/environment", __FILE__)
require 'rspec/rails'
require 'shoulda-matchers'
require 'factory_girl_rails'
require 'database_cleaner'

ActiveRecord::Migration.maintain_test_schema!

RSpec.configure do |config|
  config.include FactoryGirl::Syntax::Methods

  config.use_transactional_fixtures = false
  config.infer_spec_type_from_file_location!

  config.include(Shoulda::Matchers::ActiveModel, type: :model)
  config.include(Shoulda::Matchers::ActiveRecord, type: :model)

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

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

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

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
pulitzer-0.11.3 spec/rails_helper.rb
pulitzer-0.11.2 spec/rails_helper.rb
pulitzer-0.11.1 spec/rails_helper.rb
pulitzer-0.11.0 spec/rails_helper.rb
pulitzer-0.10.3 spec/rails_helper.rb
pulitzer-0.10.2 spec/rails_helper.rb
pulitzer-0.10.1 spec/rails_helper.rb
pulitzer-0.10.0 spec/rails_helper.rb
pulitzer-0.5.14 spec/rails_helper.rb
pulitzer-0.5.13 spec/rails_helper.rb
pulitzer-0.5.11 spec/rails_helper.rb
pulitzer-0.5.10 spec/rails_helper.rb
pulitzer-0.5.9 spec/rails_helper.rb
pulitzer-0.5.8 spec/rails_helper.rb
pulitzer-0.5.7 spec/rails_helper.rb
pulitzer-0.5.6 spec/rails_helper.rb
pulitzer-0.5.5 spec/rails_helper.rb
pulitzer-0.5.4 spec/rails_helper.rb
pulitzer-0.5.3 spec/rails_helper.rb
pulitzer-0.5.2 spec/rails_helper.rb