Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- it "should use the street address fields if they're present" do
- @venue.attributes = {:street_address => "street_address", :address => "address"}
- @venue.full_address.should == "street_address"
- end
- it "should fall back to 'address' field if street address fields are blank" do
- @venue.attributes = {:street_address => "", :address => "address"}
- @venue.full_address.should == "address"
- end
- def full_address
- result = [city, state_region, country].compact.join(' ')
- result = address if result.blank?
- end
Add Comment
Please, Sign In to add comment