Sha256: 720e23dcc4362df6065a1f37caf815809c2eb93539cd5e0f720e19ce9b7d6dd0
Contents?: true
Size: 1.3 KB
Versions: 5
Compression:
Stored size: 1.3 KB
Contents
require 'spec_helper' describe Capgun::Job do describe "#==" do it "should return true when ids and classes are equal" do user = Capgun::Job.new('id' => 1) other = Capgun::Job.new('id' => 1) (user == other).should be_true end it "should return false when classes are not equal" do user = Capgun::Job.new('id' => 1) other = Capgun::Order.new('id' => 1) (user == other).should be_false end it "should return false when ids are not equal" do user = Capgun::Job.new('id' => 1) other = Capgun::Job.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::Job.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::Job.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::Job.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::Job.new user.updated_at.should be_nil end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
capgun-0.2.0 | spec/capgun/job_spec.rb |
capgun-0.1.2 | spec/capgun/job_spec.rb |
capgun-0.1.1 | spec/capgun/job_spec.rb |
capgun-0.1.0 | spec/capgun/job_spec.rb |
capgun-0.0.3 | spec/capgun/job_spec.rb |