Sha256: 4d536892f4e678a2f2f95ea046ab8b2a464a0a48be7c3b76bd35dff68ebbf8a9
Contents?: true
Size: 777 Bytes
Versions: 5
Compression:
Stored size: 777 Bytes
Contents
require 'spec_helper' describe Cal::Month do subject { described_class.new @calendar } before { @calendar = OpenStruct.new } describe "==" do it "is true with another month with the same calendar" do (subject == described_class.new(@calendar)).should be_true end it "is false with another month with a different calendar" do (subject == described_class.new(Object.new)).should be_false end it "is false with a non month" do (subject == Object.new).should be_false end end describe "calendar" do it "is the given calendar" do subject.calendar.should == @calendar end end describe "to_s" do before { @calendar.stub(:date) { Date.new 2012, 3 } } it { subject.to_s.should == 'March' } end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
cal-0.4.1 | spec/cal/month_spec.rb |
cal-0.4.0 | spec/cal/month_spec.rb |
cal-0.3.0 | spec/cal/month_spec.rb |
cal-0.2.1 | spec/cal/month_spec.rb |
cal-0.2.0 | spec/cal/month_spec.rb |