spec/spec_helper.rb in mixpanel-0.6.1 vs spec/spec_helper.rb in mixpanel-0.7.0
- old
+ new
@@ -5,13 +5,14 @@
require 'nokogiri'
Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}
MIX_PANEL_TOKEN = "e2d8b0bea559147844ffab3d607d26a6"
-def mixpanel_queue_should_include(mixpanel, event, properties)
- mixpanel.queue.each do |event_hash|
- event_hash[:event].should == event
- event_hash[:properties].should == properties if properties
+
+def mixpanel_queue_should_include(mixpanel, type, *arguments)
+ mixpanel.queue.each do |event_type, event_arguments|
+ event_arguments.should == arguments.map{|arg| arg.to_json}
+ event_type.should == type
end
end
# Fakeweb
FakeWeb.allow_net_connect = false