Sha256: 021df200d54de1f3142f37eb90708309cfddb54fac608c961df888ab1d037320

Contents?: true

Size: 562 Bytes

Versions: 4

Compression:

Stored size: 562 Bytes

Contents

# This will responsable to check which ORM is loaded and include respective
# matchers.
#
if defined?(ActiveRecord::Base)
  unless Remarkable.const_defined?('ActiveRecord')
    begin
      require 'remarkable_activerecord'
    rescue LoadError
      require 'rubygems'
      gem 'remarkable_activerecord'
      require 'remarkable_activerecord'
    end
  end

  # Include Remarkable ActiveRecord matcher in appropriate ExampleGroup
  if defined?(RSpec::Rails)
    Remarkable.include_matchers!(Remarkable::ActiveRecord, RSpec::Rails::ModelExampleGroup)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
benhutton-remarkable_rails-4.0.0.alpha7 lib/remarkable_rails/active_orm.rb
benhutton-remarkable_rails-4.0.0.alpha6 lib/remarkable_rails/active_orm.rb
benhutton-remarkable_rails-4.0.0.alpha5 lib/remarkable_rails/active_orm.rb
benhutton-remarkable_rails-4.0.0.alpha4 lib/remarkable_rails/active_orm.rb