Sha256: 7d8a32c174a0c5fa7af6b89e5cfa7cd672003c8664e560a5dfd3a5360f62e0bc
Contents?: true
Size: 599 Bytes
Versions: 4
Compression:
Stored size: 599 Bytes
Contents
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
4 entries across 4 versions & 1 rubygems