Sha256: 18b77ed2e2384e442b0c6eb0bbc9321c9cf2a03ea62ef48e86ced752bea65854

Contents?: true

Size: 678 Bytes

Versions: 18

Compression:

Stored size: 678 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

18 entries across 18 versions & 1 rubygems

Version Path
doorkeeper-1.1.0 spec/support/orm/mongoid.rb
doorkeeper-1.0.0 spec/support/orm/mongoid.rb
doorkeeper-1.0.0.rc2 spec/support/orm/mongoid.rb
doorkeeper-1.0.0.rc1 spec/support/orm/mongoid.rb
doorkeeper-0.7.4 spec/support/orm/mongoid.rb
doorkeeper-0.7.3 spec/support/orm/mongoid.rb
doorkeeper-0.7.2 spec/support/orm/mongoid.rb
doorkeeper-0.7.1 spec/support/orm/mongoid.rb
doorkeeper-0.7.0 spec/support/orm/mongoid.rb
doorkeeper-0.6.7 spec/support/orm/mongoid.rb
doorkeeper-0.6.6 spec/support/orm/mongoid.rb
doorkeeper-0.6.5 spec/support/orm/mongoid.rb
doorkeeper-0.6.4 spec/support/orm/mongoid.rb
doorkeeper-0.6.3 spec/support/orm/mongoid.rb
doorkeeper-0.6.2 spec/support/orm/mongoid.rb
doorkeeper-0.6.1 spec/support/orm/mongoid.rb
doorkeeper-0.6.0 spec/support/orm/mongoid.rb
doorkeeper-0.6.0.rc1 spec/support/orm/mongoid.rb