Sha256: aeae5ed4136ebd6edf7a3a7b76da91af227b0100ec928f32f8952ab5ab3934a3
Contents?: true
Size: 1.11 KB
Versions: 1
Compression:
Stored size: 1.11 KB
Contents
require File.dirname(__FILE__) + '/spec_helper.rb' describe AMEE::Object do it "can be created from hash of data" do data = {} data[:uid] = @uid = 'AB69E4AE213B' data[:created] = @creation_time = Time.now - 10000 data[:modified] = @modification_time = Time.now - 1000 data[:path] = @path = "/transport/plane/generic/ABCD1234" data[:name] = @name = "kgPerPassengerJourney" o = AMEE::Object.new(data) o.uid.should == @uid o.created.should == @creation_time o.modified.should == @modification_time o.path.should == @path o.name.should == @name end it "should have a uid" do AMEE::Object.new.should respond_to(:uid) end it "should have a created time" do AMEE::Object.new.should respond_to(:created) end it "should have a modified time" do AMEE::Object.new.should respond_to(:modified) end it "should have a name" do AMEE::Object.new.should respond_to(:name) end it "can be created without data" do o = AMEE::Object.new o.uid.should be_nil o.created.should == o.modified o.path.should be_nil o.name.should be_nil end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
amee-2.7.0 | spec/object_spec.rb |