Sha256: 0ea91c8097ddef71f5285317afa76d452f40d3b7e3e343863bc61600460cec04

Contents?: true

Size: 513 Bytes

Versions: 6

Compression:

Stored size: 513 Bytes

Contents

require 'test/unit'
require 'pollster'
include Pollster

class PollsterTest < Test::Unit::TestCase

  def test_ge_chart
    assert_equal "US", Chart.find('2012-general-election-romney-vs-obama').state
  end

  def test_poll_page_size
    assert_equal 10, Poll.all.size
  end

  def test_invalid_chart_slug
    assert_raise(Exception) { Chart.find('invalid-slug') }
  end

  def test_estimates_by_date
    assert_block do
      chart = Chart.all.first
      chart.estimates_by_date.is_a?(Array)
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pollster-0.2.3 test/test_pollster.rb
pollster-0.2.2 test/test_pollster.rb
pollster-0.2.1 test/test_pollster.rb
pollster-0.2.0 test/test_pollster.rb
pollster-0.1.1 test/test_pollster.rb
pollster-0.1.0 test/test_pollster.rb