spec/unit/design_spec.rb in couchrest_model-2.0.4 vs spec/unit/design_spec.rb in couchrest_model-2.1.0.beta1

- old
+ new

@@ -42,11 +42,11 @@ end describe "base methods" do before :each do - @model = mock("ModelExample") + @model = double("ModelExample") @model.stub(:to_s).and_return("ModelExample") @obj = CouchRest::Model::Design.new(@model) end @@ -98,10 +98,10 @@ @doc = @mod.design_doc @db = @mod.database end it "should not have been saved up until sync called" do - lambda { @mod.database.get(@doc['_id']) }.should raise_error(RestClient::ResourceNotFound) + expect(@mod.database.get(@doc['_id'])).to be_nil end it "should save a design that is in cache and has changed" do @doc.sync # put in cache