Guest User

Untitled

a guest
Apr 23rd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. it "should use the street address fields if they're present" do
  2. @venue.attributes = {:street_address => "street_address", :address => "address"}
  3. @venue.full_address.should == "street_address"
  4. end
  5.  
  6. it "should fall back to 'address' field if street address fields are blank" do
  7. @venue.attributes = {:street_address => "", :address => "address"}
  8. @venue.full_address.should == "address"
  9. end
  10.  
  11. def full_address
  12. result = [city, state_region, country].compact.join(' ')
  13. result = address if result.blank?
  14. end
Add Comment
Please, Sign In to add comment