Sha256: c0351203677ec1d07bbecf6d5ec104d0e246002ef7d9953b5ad6f5ba330eb613
Contents?: true
Size: 1.32 KB
Versions: 2
Compression:
Stored size: 1.32 KB
Contents
require 'spec_helper' describe Capgun::Order do describe "#==" do it "should return true when ids and classes are equal" do user = Capgun::Order.new('id' => 1) other = Capgun::Order.new('id' => 1) (user == other).should be_true end it "should return false when classes are not equal" do user = Capgun::Order.new('id' => 1) other = Capgun::Job.new('id' => 1) (user == other).should be_false end it "should return false when ids are not equal" do user = Capgun::Order.new('id' => 1) other = Capgun::Order.new('id' => 2) (user == other).should be_false end end describe "#created_at" do it "should return a Time when created_at is set" do user = Capgun::Order.new('created_at' => "Mon Jul 16 12:59:01 +0000 2007") user.created_at.should be_a Time end it "should return nil when created_at is not set" do user = Capgun::Order.new user.created_at.should be_nil end end describe "#updated_at" do it "should return a Time when updated_at is set" do user = Capgun::Order.new('updated_at' => "Mon Jul 16 12:59:01 +0000 2007") user.updated_at.should be_a Time end it "should return nil when updated_at is not set" do user = Capgun::Order.new user.updated_at.should be_nil end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
capgun-0.1.0 | spec/capgun/order_spec.rb |
capgun-0.0.3 | spec/capgun/order_spec.rb |