Sha256: a54250d2b07a68676326b61907f9b1f2254c180e6448c21b3c4c9f9cf1fcc3e2

Contents?: true

Size: 542 Bytes

Versions: 2

Compression:

Stored size: 542 Bytes

Contents

require "active_record"
require "with_model"

if defined?(RSpec)
  # For RSpec 2 users.
  RSpec.configure do |config|
    config.extend WithModel
  end
else
  # For RSpec 1 users.
  Spec::Runner.configure do |config|
    config.extend WithModel
  end
end

# WithModel requires ActiveRecord::Base.connection to be established.
# If ActiveRecord already has a connection, as in a Rails app, this is unnecessary.
ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => ":memory:")

# For readme_spec.rb
module SomeModule; end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
with_model-0.1.4 spec/spec_helper.rb
with_model-0.1.2 spec/spec_helper.rb