Sha256: fa7581ab7e0fd63bdc97c0f63ba772871e4520cb4dcfc047549ce12dc1a0f848

Contents?: true

Size: 617 Bytes

Versions: 10

Compression:

Stored size: 617 Bytes

Contents

require 'spec_helper'

describe Authenticate::Modules do
  # dummy user model to test .check_fields
  class UserProfile
    extend ActiveModel::Model
    include Authenticate::Modules
  end

  describe '.check_fields' do
    context 'user model with missing fields' do
      it 'fails when required_fields are not present' do
        expect { UserProfile.load_modules }.to raise_error(Authenticate::Modules::MissingAttribute)
      end
    end
    context 'user model with all fields' do
      it 'fleshed out user model is fine' do
        expect { User.load_modules }.to_not raise_error
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
authenticate-0.7.3 spec/model/modules_spec.rb
authenticate-0.7.2 spec/model/modules_spec.rb
authenticate-0.7.1 spec/model/modules_spec.rb
authenticate-0.7.0 spec/model/modules_spec.rb
authenticate-0.6.1 spec/model/modules_spec.rb
authenticate-0.6.0 spec/model/modules_spec.rb
authenticate-0.5.0 spec/model/modules_spec.rb
authenticate-0.4.0 spec/model/modules_spec.rb
authenticate-0.3.3 spec/model/modules_spec.rb
authenticate-0.3.2 spec/model/modules_spec.rb