Sha256: 9ede6396b5cdc32176b8126c93db465cc553ccc61d3bae03d6e01b35df04832e
Contents?: true
Size: 629 Bytes
Versions: 7
Compression:
Stored size: 629 Bytes
Contents
# -*- encoding : utf-8 -*- require 'spec_helper' describe Mongoid::Userstamp::UserConfig do subject { Mongoid::Userstamp::UserConfig.new } before { Mongoid::Userstamp.stub('config').and_return(OpenStruct.new(user_reader: :foo)) } describe '#initialize' do context 'with opts hash' do subject { Mongoid::Userstamp::UserConfig.new({reader: :bar}) } it { should be_a Mongoid::Userstamp::UserConfig } it { subject.reader.should eq :bar } end context 'without opts hash' do it { should be_a Mongoid::Userstamp::UserConfig } it { subject.reader.should eq :foo } end end end
Version data entries
7 entries across 7 versions & 1 rubygems