Sha256: 993a6ad683f7f2c555787038ecb038b39cf6d6b1537ce21e04afe351e10d7ca7

Contents?: true

Size: 569 Bytes

Versions: 5

Compression:

Stored size: 569 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?(Spec::Rails)
    Remarkable.include_matchers!(Remarkable::ActiveRecord, Spec::Rails::Example::ModelExampleGroup)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
remarkable_rails-3.1.13 lib/remarkable_rails/active_orm.rb
remarkable_rails-3.1.12 lib/remarkable_rails/active_orm.rb
remarkable_rails-3.1.11 lib/remarkable_rails/active_orm.rb
remarkable_rails-3.1.10 lib/remarkable_rails/active_orm.rb
remarkable_rails-3.1.9 lib/remarkable_rails/active_orm.rb