Sha256: 3267c872f3ca886c6182c3ba02040ac92c1d422063505e365fe969cb4008b2e3

Contents?: true

Size: 781 Bytes

Versions: 19

Compression:

Stored size: 781 Bytes

Contents

# encoding: utf-8
module Support #:nodoc:
  module Authentication
    extend self

    def configured?
      begin
        master_uri = "mongodb://mongoid:test@localhost:27017/mongoid_spacial_test"
        Mongo::Connection.from_uri(master_uri)
        true
      rescue Mongo::AuthenticationError => e
        false
      end
    end

    def message
      %Q{
      ---------------------------------------------------------------------
      A user needs to be configured for authentication, otherwise some
      configuration specs will not get run. You may set it up from the
      mongo console:

        $ use mongoid_spacial_test;
        $ db.addUser("mongoid", "test");
      ---------------------------------------------------------------------
      }
    end
  end
end

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
mongoid_spacial-0.2.17 spec/support/authentication.rb
sig_mongoid_spacial-0.2.17 spec/support/authentication.rb
cb_mongoid_spacial-0.2.16 spec/support/authentication.rb
mongoid_spacial-0.2.16 spec/support/authentication.rb
mongoid_spacial-0.2.13 spec/support/authentication.rb
mongoid_spacial-0.2.12 spec/support/authentication.rb
mongoid_spacial-0.2.11 spec/support/authentication.rb
mongoid_spacial-0.2.10 spec/support/authentication.rb
mongoid_spacial-0.2.8 spec/support/authentication.rb
mongoid_spacial-0.2.7 spec/support/authentication.rb
mongoid_spacial-0.2.6 spec/support/authentication.rb
mongoid_spacial-0.2.5 spec/support/authentication.rb
mongoid_spacial-0.2.4 spec/support/authentication.rb
mongoid_spacial-0.2.3 spec/support/authentication.rb
mongoid_spacial-0.2.2 spec/support/authentication.rb
mongoid_spacial-0.2.0 spec/support/authentication.rb
mongoid_spacial-0.1.1 spec/support/authentication.rb
mongoid_spacial-0.1.0 spec/support/authentication.rb
mongoid_spacial-0.0.1 spec/support/authentication.rb