search for: valid_address_attribut

Displaying 2 results from an estimated 2 matches for "valid_address_attribut".

2007 Dec 03
5
spec for model_id should eql
.... Failure message: ''Address fetch and geocode should extract department and write to address object'' FAILED expected 3, got nil (using .eql?) This spec that is failing: @address.department_id.should eql(3) before: before do @address = Address.new @address.attributes = valid_address_attributes @address.save @department = mock_model(Department) @department.stub!(:find_by_code).with("75").and_return("3") end The line of code I am writing the spec for: self.department = Department.find_by_code(self.postcode[0..1]) Many thanks, Omar -------------- nex...
2007 Dec 01
0
mock feed
...en).exactly(1).times. with("http://maps.google.com/maps/geo?#{directions}"). and_return(xml) end ....................... describe Address, "fetch and geocode" do include AddressSpecHelper before do @address = Address.new mock_feed @address.attributes = valid_address_attributes @address.save end it "should populate town and address 1" do @address.town.should eql("Paris") @address.address_1.should eql("71, Avenue Parmentier") end it "should populate lat and lng as BigDecimals" do @address.lat.should eql(Bi...