Sha256: 1b91f414eb09108c9e5b8d3f219e343f4d223399c893c6fecf933e6d3507934e
Contents?: true
Size: 493 Bytes
Versions: 1
Compression:
Stored size: 493 Bytes
Contents
require "spec_helper" describe "The Smooth Event Tracking API" do let(:events) { Smooth::Event } it "should use the instrumentation system to implement a little pub sub" do bucket = [] events.subscribe_to "test.smooth" do |event| bucket << event end needle = rand(46**8).to_s(36) events.track_event 'test.smooth', line: "what up #{ needle }?" got_event = bucket.any? {|e| e.payload.line.include?(needle) } expect(got_event).to equal(true) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
smooth-2.0.1 | spec/lib/smooth/event_spec.rb |