spec/rentjuicer/response_spec.rb in rentjuicer-0.6.1 vs spec/rentjuicer/response_spec.rb in rentjuicer-0.6.2
- old
+ new
@@ -63,9 +63,14 @@
it "should allow response.body methods to be called on response" do
body = stub(:total_count => 25)
@results.body = body
@results.total_count.should == 25
end
+
+ it "should return @properties.size when total_count is nil for total_results" do
+ @results.body.stub!(:total_count).and_return(nil)
+ @results.total_results.should == 20
+ end
it "should call super if body does not response to the method" do
lambda { @results.bad_method }.should raise_error(NoMethodError, /undefined method `bad_method'/)
end
end