Sha256: 29c0495dbd8cc9575774076346e27dae89f2fc206cd85c490538f29a0d267780
Contents?: true
Size: 560 Bytes
Versions: 2
Compression:
Stored size: 560 Bytes
Contents
require 'test_helper' class GarbTest < MiniTest::Unit::TestCase context "The Garb module" do should 'prefix a string with ga: for GA' do assert_equal '-ga:bob', Garb.to_google_analytics(stub(:to_google_analytics => '-ga:bob')) assert_equal 'ga:bob', Garb.to_google_analytics('bob') end should 'parse out - and put it before ga:' do assert_equal '-ga:pageviews', Garb.to_google_analytics('-pageviews') end should 'remove ga: prefix' do assert_equal 'bob', Garb.from_google_analytics('ga:bob') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
garb-0.9.8 | test/unit/garb_test.rb |
garb-0.9.7 | test/unit/garb_test.rb |