Sha256: a0205ac5036003da984cf4de5158b46a5587d52f390e95067b09a3815747e354

Contents?: true

Size: 646 Bytes

Versions: 5

Compression:

Stored size: 646 Bytes

Contents

require File.expand_path('../helper', __FILE__)
require File.expand_path('../settings', __FILE__)

class TestResults < Test::Unit::TestCase

  def setup
    @response = GatticaTest::get({ :start_index => 5, :max_results => 5 })
  end

  def test_max_results
    assert @response.points.count == 5, "should only return 5 results"
  end

  def test_start_index
    assert @response.points.first.title == "ga:date=20100105", "should start on the 5th"
  end

  def test_conversions
    assert @response.class.inspect == 'Gattica::DataSet', "should be a Gattica:DataSet"
    assert @response.to_h.class.inspect == 'Hash', "Should be a hash"
  end

end

Version data entries

5 entries across 5 versions & 4 rubygems

Version Path
readmedia-gattica-0.6.2.1 test/test_results.rb
chrisle-gattica-0.6.3 test/test_results.rb
songphi-gattica-0.5.3 test/test_results.rb
betapond-gattica-0.5.2 test/test_results.rb
betapond-gattica-0.5.1 test/test_results.rb