Sha256: 0b19dd5e8d7ab2e821f9ca5142e41fc842e959374e6898ef9a22dbe806ac0938

Contents?: true

Size: 613 Bytes

Versions: 1

Compression:

Stored size: 613 Bytes

Contents

require_relative 'setup'
require 'rspec'
require 'blueprints_boy'
require_relative '../shared'

BlueprintsBoy.enable do |config|
  config.root = File.dirname(__FILE__)
  config.transactions = false
end

describe ActiveRecord::Base do
  it "should create record in database" do
    build :apple
    apple.should be_a(ARFruit)
    apple.should be_persisted
    apple.species.should == 'apple'
  end

  it "should clean database before each test" do
    ARFruit.all.should == []
  end

  it "should use transactions for cleaning database" do
    ActiveRecord::Base.connection.open_transactions.should == 0
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blueprints_boy-1.0.0 integration/active_record/active_record_truncation_spec.rb