Sha256: 7f2f7f096a51b31ccd22068008e1288fd68335288404799cf926d18c52d70fd6

Contents?: true

Size: 988 Bytes

Versions: 22

Compression:

Stored size: 988 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'helper'))

context "Initiating a Details" do
  setup do
    begin 
      run_with_rescue do
        CityGrid::Details.new :public_id => "philip-marie-restaurant-new-york"
      end
    rescue
      puts "An error occurred while fetch philip-marie-restaurant-new-york details"
    end
  end

  should "return a single Details object" do
    topic.is_a? CityGrid::Details
  end
end
 
context "Initiating new MultiDetails" do
  setup do
    run_with_rescue do    
      CityGrid::MultiDetails.new :public_id => "philip-marie-restaurant-new-york"
    end
  end

  should "return a MultiDetails object" do
    topic.is_a? CityGrid::MultiDetails
  end

  should "contain multiple listings" do
    topic.reject do |listing|
      listing.is_a? CityGrid::Listing
    end.empty?
  end

  asserts "all listings are loaded" do
    topic.reject do |listing|
      listing.instance_variable_get "@loaded"
    end.empty?
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

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