spec/keen/client/maintenance_methods_spec.rb in keen-0.9.8 vs spec/keen/client/maintenance_methods_spec.rb in keen-0.9.9

- old
+ new

@@ -18,11 +18,11 @@ let(:event_collection) { :foodstuffs } it 'should not require filters' do url = delete_url(event_collection) stub_keen_delete(url, 204) - client.delete(event_collection).should == true + expect(client.delete(event_collection)).to be true expect_keen_delete(url, "sync", master_key) end it "should accept and use filters" do filters = { @@ -40,31 +40,31 @@ describe '#event_collections' do let(:events_url) { "#{api_url}/#{api_version}/projects/#{project_id}/events" } it "should fetch the project's event resource" do stub_keen_get(events_url, 200, [{ "a" => 1 }, { "b" => 2 }] ) - client.event_collections.should == [{ "a" => 1 }, { "b" => 2 }] + expect(client.event_collections).to match_array([{ "a" => 1 }, { "b" => 2 }]) expect_keen_get(events_url, "sync", master_key) end end describe '#event_collection' do let(:event_collection) { "foodstuffs" } let(:events_url) { "#{api_url}/#{api_version}/projects/#{project_id}/events/#{event_collection}" } it "should fetch the project's named event resource" do stub_keen_get(events_url, 200, [{ "b" => 2 }] ) - client.event_collection(event_collection).should == [{ "b" => 2 }] + expect(client.event_collection(event_collection)).to match_array([{ "b" => 2 }]) expect_keen_get(events_url, "sync", master_key) end end describe '#project_info' do let(:project_url) { "#{api_url}/#{api_version}/projects/#{project_id}" } it "should fetch the project resource" do stub_keen_get(project_url, 200, [{ "a" => 1 }, { "b" => 2 }] ) - client.project_info.should == [{ "a" => 1 }, { "b" => 2 }] + expect(client.project_info).to match_array([{ "a" => 1 }, { "b" => 2 }]) expect_keen_get(project_url, "sync", master_key) end end end