Sha256: ddfd18489179a94b8880bf4349ece446d5db4876cd46f7a777ac114431e01d26
Contents?: true
Size: 678 Bytes
Versions: 1
Compression:
Stored size: 678 Bytes
Contents
require 'helper' describe RememberMe::Model do before :all do class User include Mongoid::Document include RememberMe::Model def save(arg = {}) true end end @model = User.new end it { expect(@model.fields.has_key? 'remember_created_at').to be_true } it { expect(@model.fields['remember_created_at'].options[:type]).to eq Time } it { expect(@model.respond_to? :remember_me!).to be_true } describe '#remember_me!' do before { @model.remember_me! } it { expect(@model.remember_created_at.class).to eq Time } end describe '#forget_me!' do it { expect(@model.respond_to? :forget_me!).to be_true } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
remember_me-0.0.1 | spec/model_spec.rb |