Sha256: c1b04e46f6b1579b4a781c09df3710c833b563e8d51b6f83fe29a5bfa3135943

Contents?: true

Size: 467 Bytes

Versions: 12

Compression:

Stored size: 467 Bytes

Contents

require File.join(File.dirname(__FILE__), '..', '/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 'remove ga: prefix' do
      assert_equal 'bob', Garb.from_google_analytics('ga:bob')
    end
  end
end

Version data entries

12 entries across 12 versions & 4 rubygems

Version Path
garb-0.7.5 test/unit/garb_test.rb
shingara-garb-0.7.6 test/unit/garb_test.rb
garb-no-activesupport-0.7.4 test/unit/garb_test.rb
garb-0.7.4 test/unit/garb_test.rb
garb-no-activesupport-0.7.3 test/unit/garb_test.rb
garb-0.7.3 test/unit/garb_test.rb
garb-0.7.2 test/unit/garb_test.rb
garb-0.7.1 test/unit/garb_test.rb
garb-authsub-0.7.0 test/unit/garb_test.rb
garb-0.7.0 test/unit/garb_test.rb
garb-0.6.0 test/unit/garb_test.rb
garb-0.5.1 test/unit/garb_test.rb