Sha256: 62229f8a31a68afecfcdd5119188ea619119eba607d03bc43c7017289a54efae

Contents?: true

Size: 1.43 KB

Versions: 23

Compression:

Stored size: 1.43 KB

Contents

# require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
# 
# context "A Listing created from scratch" do
#   setup do
#     CityGrid::Listing.new "id" => 7117426
#   end
# 
#   should "load details after first access" do
#     topic.tips
#   end
# end
# 
# context "A Listing created from search" do
#   setup do
#     CityGrid.search(:what => "food", :where => "seattle").first
#   end
# 
#   # Test loading
#   # ----------------- #
#   context "that has not been accessed" do
#     should "not be loaded" do
#       !topic.clone.instance_variable_get "@loaded"
#     end
#   end
# 
#   context "that has a method called on it for the first time" do
#     setup do
#       old = topic.clone
#       listing = topic.clone
#       listing.summary
#       [old, listing]
#     end
# 
#     should "become loaded" do
#       topic.last.instance_variable_get "@loaded"
#     end
# 
#     should "update details into itself" do
#       topic.first != topic.last
#     end
#   end
# 
#   # # Test offers, reviews
#   # # -------------------- #
#   # should "get offers" do
#   #   !topic.offers.empty?
#   # end
#   # 
#   # # Test reviews
#   # # -------------------- #
#   # should "get reviews" do
#   #   !topic.reviews.empty?
#   # end
# 
#   context "updating reviews" do
#     setup do
#       [topic.reviews.clone, topic.reviews(:rpp => 2).clone]
#     end
# 
#     should "not be the same" do
#       topic[0] != topic[-1]
#     end
#   end
# end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
citygrid_api-0.0.28 test/test_listing.rb
citygrid_api-0.0.27 test/test_listing.rb
citygrid_api-0.0.26 test/test_listing.rb
citygrid_api-0.0.25 test/test_listing.rb
citygrid_api-0.0.24 test/test_listing.rb
citygrid_api-0.0.23 test/test_listing.rb
citygrid_api-0.0.22 test/test_listing.rb
citygrid_api-0.0.21 test/test_listing.rb
citygrid_api-0.0.20 test/test_listing.rb
citygrid_api-0.0.19 test/test_listing.rb
citygrid_api-0.0.18 test/test_listing.rb
citygrid_api-0.0.17 test/test_listing.rb
citygrid_api-0.0.16 test/test_listing.rb
citygrid_api-0.0.15 test/test_listing.rb
citygrid_api-0.0.14 test/test_listing.rb
citygrid_api-0.0.13 test/test_listing.rb
citygrid_api-0.0.12 test/test_listing.rb
citygrid_api-0.0.11 test/test_listing.rb
citygrid_api-0.0.10 test/test_listing.rb
citygrid_api-0.0.9 test/test_listing.rb