spec/lib/model_spec.rb in addywaddy-couch_surfer-0.0.1 vs spec/lib/model_spec.rb in addywaddy-couch_surfer-0.0.2

- old
+ new

@@ -41,11 +41,11 @@ "function(keys, values, rereduce) { return sum(values); }" key_writer :date - key_reader :slug, :created_at, :updated_at + key_reader :slug #, :created_at, :updated_at key_accessor :title, :tags timestamps! before(:save, :generate_slug_from_title) @@ -534,9 +534,19 @@ foundart.created_at.should == foundart.updated_at end it "should set the time on update" do @art.save @art.created_at.should < @art.updated_at + end + + it "should return both created_at and updated_at as instances of Time" do + @art.created_at.should be_kind_of(Time) + @art.updated_at.should be_kind_of(Time) + end + it "when retrieved should return both created_at and updated_at as instances of Time" do + foundart = Article.get @art.id + foundart.created_at.should be_kind_of(Time) + foundart.updated_at.should be_kind_of(Time) end end describe "a model with simple views and a default param" do before(:all) do