spec/mixpanel/middleware_spec.rb in mixpanel-3.1.0 vs spec/mixpanel/middleware_spec.rb in mixpanel-3.4.0
- old
+ new
@@ -6,10 +6,11 @@
mixpanel.append_set(:first_name => "foo", :last_name => "bar", :username => "foobar")
mixpanel.append_increment(:sign_in_rate)
end
def check_for_default_appends_on(txt)
- txt.should =~ /mixpanel\.track\("Visit",\s?\{.*"article":1[\{|,]/
+
+ txt.should =~ /mixpanel\.track\("Visit",\s?\{.*"article":1/
txt.should =~ /mixpanel\.track\("Sign in",\s?\{.*"time":.*\}/
txt.should =~ /mixpanel\.people\.set\(.*\);\nmixpanel.people.increment\(\"sign_in_rate\",\s?1\);/
match = txt.match(/mixpanel\.people\.set\((.*\));/)
match[1].should =~ /\"\$first_name\":\"foo\"/
match[1].should =~ /\"\$username\":\"foobar\"/