spec/base_spec.rb in reviewed-0.1.28 vs spec/base_spec.rb in reviewed-0.1.29

- old
+ new

@@ -39,12 +39,24 @@ Reviewed::Article.association_name.should eql("articles") end end describe 'attributes' do + before(:each) do + @timestamp = Time.parse("01/01/2013 10:00:00 GMT") + @model = Example.new(id: 'id', super_awesome: 'true', created_at: @timestamp.to_s, updated_at: @timestamp.to_s) + end + it 'returns the named attribute (via method missing)' do - model = Example.new(id: 'id', super_awesome: 'true') - model.super_awesome.should == 'true' + @model.super_awesome.should == 'true' + end + + it 'has a created at timestamp' do + @model.created_at.should == @timestamp + end + + it 'has an updated at timestamp' do + @model.updated_at.should == @timestamp end end describe 'respond_to?' do before(:each) do