Sha256: 69fe4141b7bf5a6d68fe60717f1e8dcb67f9b9d5377daa059389958fee1d13af

Contents?: true

Size: 973 Bytes

Versions: 17

Compression:

Stored size: 973 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
require File.expand_path(File.dirname(__FILE__) + '/../app/mailers/sorcery_mailer')
require File.expand_path(File.dirname(__FILE__) + '/../../shared_examples/user_shared_examples')

describe "User with no submodules (core)" do
  before(:all) do
    sorcery_reload!
  end

  describe User, "when app has plugin loaded" do
    it "User should respond_to .authenticates_with_sorcery!" do
      User.should respond_to(:authenticates_with_sorcery!)
    end
  end
  
  # ----------------- PLUGIN CONFIGURATION -----------------------
  
  it_should_behave_like "rails_3_core_model"
  
  describe User, "external users" do

    it_should_behave_like "external_user"
    
  end

  describe User, "when inherited" do
    it "should inherit mongo_mapper keys" do
      User.class_eval do
        key :blabla
      end
      class SubUser < User
      end

      SubUser.keys.should include("blabla")
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
sorcery-0.8.4 spec/rails3_mongo_mapper/spec/user_spec.rb
sorcery-0.8.2 spec/rails3_mongo_mapper/spec/user_spec.rb
sorcery-0.8.1 spec/rails3_mongo_mapper/spec/user_spec.rb
sorcery-0.8.0 spec/rails3_mongo_mapper/spec/user_spec.rb
sorcery-0.7.13 spec/rails3_mongo_mapper/spec/user_spec.rb
sorcery-0.7.12 spec/rails3_mongo_mapper/spec/user_spec.rb
sorcery-0.7.11 spec/rails3_mongo_mapper/spec/user_spec.rb
sorcery-0.7.10 spec/rails3_mongo_mapper/spec/user_spec.rb
sorcery-0.7.9 spec/rails3_mongo_mapper/spec/user_spec.rb
sorcery-0.7.8 spec/rails3_mongo_mapper/spec/user_spec.rb
sorcery-0.7.7 spec/rails3_mongo_mapper/spec/user_spec.rb
sorcery-0.7.6 spec/rails3_mongo_mapper/spec/user_spec.rb
sorcery-0.7.5 spec/rails3_mongo_mapper/spec/user_spec.rb
sorcery-0.7.4 spec/rails3_mongo_mapper/spec/user_spec.rb
sorcery-0.7.3 spec/rails3_mongo_mapper/spec/user_spec.rb
sorcery-0.7.2 spec/rails3_mongo_mapper/spec/user_spec.rb
sorcery-0.7.1 spec/rails3_mongo_mapper/spec/user_spec.rb