spec/rentjuicer/error_spec.rb in rentjuicer-0.5.1 vs spec/rentjuicer/error_spec.rb in rentjuicer-0.6.0

- old
+ new

@@ -6,12 +6,18 @@ @rentjuicer = new_rentjuicer @neighborhoods = Rentjuicer::Neighborhoods.new(@rentjuicer) mock_get(@neighborhoods.resource, 'error.json') end - it "should return an error" do + it "should not return an error" do lambda { @neighborhoods.find_all + }.should_not raise_exception + end + + it "should return an error" do + lambda { + @neighborhoods.find_all! }.should raise_exception(Rentjuicer::Error, "Rentjuicer Error: Invalid API key. (code: 1)") end end