Sha256: d7569532e67afc8f32d7ddf320c42db7b57a08b102e501ba409b00f172837861

Contents?: true

Size: 709 Bytes

Versions: 1

Compression:

Stored size: 709 Bytes

Contents

DatabaseCleaner[:mongoid].strategy = :truncation
DatabaseCleaner[:mongoid].clean_with :truncation

RSpec.configure do |config|
  config.before do
    Doorkeeper::Application.create_indexes
    Doorkeeper::AccessGrant.create_indexes
    Doorkeeper::AccessToken.create_indexes
  end
end

module Doorkeeper
  class PlaceholderApplicationOwner
    include Mongoid::Document

    if ::Mongoid::VERSION >= "3"
      self.store_in :collection => :placeholder_application_owners
    else
      self.store_in :placeholder_application_owners
    end

    has_many :applications

  end

  module OrmHelper
  	def mock_application_owner
  		PlaceholderApplicationOwner.new
  	end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
couchkeeper-0.6.7 spec/support/orm/mongoid.rb