Sha256: cf02ed7b3d03bc6fdf566189f7e4566ef229e96fa833a13c40ca0348bc38048c
Contents?: true
Size: 739 Bytes
Versions: 17
Compression:
Stored size: 739 Bytes
Contents
require "test_helper" describe Vanity::Helpers do describe "#track!" do it "identity option sets identity" do metric "Coolness" new_ab_test :foobar do alternatives "foo", "bar" default "foo" metrics :coolness end Vanity.track!(:coolness, :identity=>'quux') assert_equal 1, experiment(:foobar).alternatives.sum(&:conversions) end it "accepts value for conversion" do metric "Coolness" new_ab_test :foobar do alternatives "foo", "bar" default "foo" metrics :coolness end Vanity.track!(:coolness, :identity=>'quux', :values=>[2]) assert_equal 2, experiment(:foobar).alternatives.sum(&:conversions) end end end
Version data entries
17 entries across 17 versions & 1 rubygems