spec/ripple/timestamps_spec.rb in ripple-0.8.3 vs spec/ripple/timestamps_spec.rb in ripple-0.9.0.beta

- old
+ new

@@ -18,12 +18,12 @@ require 'support/models/clock' before :each do response = {:headers => {"content-type" => ["application/json"]}, :body => "{}"} @client = Ripple.client - @http = mock("HTTP Backend", :get => response, :put => response, :post => response, :delete => response) - @client.stub!(:http).and_return(@http) + @backend = mock("Backend", :store_object => true) + @client.stub!(:backend).and_return(@backend) @clock = Clock.new end it "should add a created_at property" do @clock.should respond_to(:created_at) @@ -49,8 +49,7 @@ it "should update the updated_at timestamp when the object is updated" do @clock.save start = @clock.updated_at @clock.save @clock.updated_at.should > start - end - + end end