Sha256: 27954761a1385b1a76b8849894c55b600902727bdccd356e206ff4cc1872e75f

Contents?: true

Size: 974 Bytes

Versions: 5

Compression:

Stored size: 974 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 mongoid fields" do
      User.class_eval do
        field :blabla
      end
      class SubUser < User
      end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sorcery-0.7.0 spec/rails3_mongoid/spec/user_spec.rb
sorcery-0.6.1 spec/rails3_mongoid/spec/user_spec.rb
sorcery-0.6.0 spec/rails3_mongoid/spec/user_spec.rb
sorcery-0.5.30 spec/rails3_mongoid/spec/user_spec.rb
sorcery-0.5.3 spec/rails3_mongoid/spec/user_spec.rb