spec/capgun/order_spec.rb in capgun-0.1.0 vs spec/capgun/order_spec.rb in capgun-0.1.1

- old
+ new

@@ -2,44 +2,44 @@ describe Capgun::Order do describe "#==" do it "should return true when ids and classes are equal" do - user = Capgun::Order.new('id' => 1) + order = Capgun::Order.new('id' => 1) other = Capgun::Order.new('id' => 1) - (user == other).should be_true + (order == other).should be_true end it "should return false when classes are not equal" do - user = Capgun::Order.new('id' => 1) + order = Capgun::Order.new('id' => 1) other = Capgun::Job.new('id' => 1) - (user == other).should be_false + (order == other).should be_false end it "should return false when ids are not equal" do - user = Capgun::Order.new('id' => 1) + order = Capgun::Order.new('id' => 1) other = Capgun::Order.new('id' => 2) - (user == other).should be_false + (order == 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 + order = Capgun::Order.new('created_at' => "Mon Jul 16 12:59:01 +0000.1.17") + order.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 + order = Capgun::Order.new + order.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 + order = Capgun::Order.new('updated_at' => "Mon Jul 16 12:59:01 +0000.1.17") + order.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 + order = Capgun::Order.new + order.updated_at.should be_nil end end end