Sha256: 0b9b8e5d150d8c3d96c95ccf1a42a43b4e48046f5122c07131ab5549b0739822

Contents?: true

Size: 784 Bytes

Versions: 7

Compression:

Stored size: 784 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 '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

7 entries across 7 versions & 1 rubygems

Version Path
flydata-0.0.5.6 spec/spec_helper.rb
flydata-0.0.5.5 spec/spec_helper.rb
flydata-0.0.5.4 spec/spec_helper.rb
flydata-0.0.5.3 spec/spec_helper.rb
flydata-0.0.5.2 spec/spec_helper.rb
flydata-0.0.5.1 spec/spec_helper.rb
flydata-0.0.5.0 spec/spec_helper.rb