spec/ragios-client_spec.rb in ragios-client-0.0.7 vs spec/ragios-client_spec.rb in ragios-client-0.1.0

- old
+ new

@@ -107,11 +107,11 @@ e.message.should include("No Notifier Found") end end it "cannot create a badly formed monitor" do - expect{@ragios.create("bad data")}.to raise_error(JSON::GeneratorError) + expect{@ragios.create("bad data")}.to raise_error(Ragios::ClientException) end end describe "More API calls" do before(:each) do @unique_name = "Google #{Time.now.to_i}" @@ -152,10 +152,10 @@ it "should update a monitor" do update_options = {every: "10m", via: ["twitter_notifier"]} @ragios.update(@monitor_id, update_options).should == {ok: true} end it "cannot update a monitor with bad data" do - expect { @ragios.update(@monitor_id,"bad data") }.to raise_error(JSON::GeneratorError) + expect { @ragios.update(@monitor_id,"bad data") }.to raise_error(Ragios::ClientException) end it "cannot update a monitor that don't exist" do update_options = {every: "5m", via: ["twitter_notifier"]} expect { @ragios.update("dont_exist", update_options) }.to raise_error(Ragios::ClientException, generate_json(error: "No monitor found with id = dont_exist")) end