Sha256: 8f8775a7842ea7e9cfae67eb8a1f3ca365082f34fc9fa616ce12df4eada9b7d7

Contents?: true

Size: 995 Bytes

Versions: 1

Compression:

Stored size: 995 Bytes

Contents

require "rails"
require "active_record"
require "active_record/rollout"
require "shoulda-matchers"
require "generators/templates/migration"
require "support/shared_contexts/rake"
require "pry"

class User < ActiveRecord::Base
  acts_as_flaggable
end

class Organization < ActiveRecord::Base
  acts_as_flaggable
end

RSpec.configure do |config|
  config.before :suite do
    ActiveRecord::Base.establish_connection \
      adapter: "sqlite3",
      database: File.dirname(__FILE__) + "/spec.sqlite3"

    require File.dirname(__FILE__) + "/support/schema.rb"
  end

  config.before :each do
    SetupActiveRecordRollout.migrate :up
    ActiveRecord::Schema.migrate :up
  end

  config.after :each do
    SetupActiveRecordRollout.migrate :down
    ActiveRecord::Schema.migrate :down
  end

  config.after :each do
    ActiveRecord::Rollout::Feature.instance_variable_set "@defined_groups", {}
    ActiveRecord::Rollout::Feature.instance_variable_set "@default_flaggable_class_name", nil
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_record_rollout-0.0.1 spec/spec_helper.rb