Sha256: 2be713ea216e5f995673beaca71d48ad7cb2ff6baa34bd5fe8d62383ba97c758

Contents?: true

Size: 571 Bytes

Versions: 6

Compression:

Stored size: 571 Bytes

Contents

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

require 'bundler'
Bundler.require
require 'rails/all'
require 'rspec/rails'

require 'cbac'

require 'support/schema'
require 'database_cleaner'

DatabaseCleaner.strategy = :transaction

RSpec.configure do |config|
  config.before(:suite) do
    Cbac::Schema.load

    Cbac::Config.verbose = false

    o = Object.new
    o.send :extend, Cbac
    o.cbac_boot!
  end

  config.after(:suite) do
    Cbac::Schema.drop
  end

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

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cbac-0.8.0 spec/spec_helper.rb
cbac-0.7.0 spec/spec_helper.rb
cbac-0.6.10 spec/spec_helper.rb
cbac-0.6.9 spec/spec_helper.rb
cbac-0.6.8 spec/spec_helper.rb
cbac-0.6.7 spec/spec_helper.rb