Sha256: 34a1e6feb4ffd2fa5d797f3722a8cae5d1af034b7717042ca545a4f31fa3eb23

Contents?: true

Size: 747 Bytes

Versions: 8

Compression:

Stored size: 747 Bytes

Contents

require 'helper'
require 'statsmix'

class TestStatsmix < Test::Unit::TestCase
  
  # TODO use fakwweb gem for testing 
  # http://technicalpickles.com/posts/stop-net-http-dead-in-its-tracks-with-fakeweb/
  # https://github.com/chrisk/fakeweb
  # http://fakeweb.rubyforge.org/
  
  # TODO use VCR for tests
  # http://www.rubyinside.com/vcr-a-recorder-for-all-your-tests-http-interactions-4169.html
  # https://github.com/myronmarston/vcr
  
  should "Track a stat and view the results in xml" do
    StatsMix.api_key = '59f08613db2691f28afe'
    result = StatsMix.track('Ruby Gem Testing')
    assert_response 200
    if StatsMix.error
      raise "Error in gem: #{StatsMix.error}"
    end
    assert !StatsMix.error
    puts result
  end
  

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
statsmix-0.1.10 test/test_statsmix.rb
statsmix-0.1.9 test/test_statsmix.rb
statsmix-0.1.8 test/test_statsmix.rb
statsmix-0.1.7 test/test_statsmix.rb
statsmix-0.1.6 test/test_statsmix.rb
statsmix-0.1.5 test/test_statsmix.rb
statsmix-0.1.4 test/test_statsmix.rb
statsmix-0.1.3 test/test_statsmix.rb