Sha256: 93e83c6048d139171dbfa39f89b8f6ed8ab01b90318a42e9197265ed612160dc

Contents?: true

Size: 815 Bytes

Versions: 10

Compression:

Stored size: 815 Bytes

Contents

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'rspec'
require 'active_record'  # for Flydata::Heroku
require 'protected_attributes'
require 'flydata'

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

RSpec.configure do |config|

  if defined? ActiveRecord
    # The ActiveRecord::Rollback exception will be caught by the transaction
    # block and roll back all the database changes after each spec.
    config.around do |example|
      if ActiveRecord::Base.connected?
        ActiveRecord::Base.transaction do
          example.run
          raise ActiveRecord::Rollback
        end
      end
    end
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
flydata-0.1.10 spec/spec_helper.rb
flydata-0.1.9 spec/spec_helper.rb
flydata-0.1.8 spec/spec_helper.rb
flydata-0.1.7 spec/spec_helper.rb
flydata-0.1.6 spec/spec_helper.rb
flydata-0.1.5 spec/spec_helper.rb
flydata-0.1.4 spec/spec_helper.rb
flydata-0.1.3 spec/spec_helper.rb
flydata-0.1.1 spec/spec_helper.rb
flydata-0.1.0 spec/spec_helper.rb