Sha256: 15e986705c96e068cbef689eba83e4319ddcdd45a50f9db20fa8ff810f41b005

Contents?: true

Size: 577 Bytes

Versions: 1

Compression:

Stored size: 577 Bytes

Contents

require 'spec_helper'

module ReplayApi
  describe EventProperties do
    subject(:properties) { EventProperties.new }
    let(:clock) { double :clock, now: Time.now }
    before { EventProperties.clock = clock }
    after { EventProperties.clock = nil }

    describe '#event_category' do
      specify { expect(properties.event_category).to eq 'general' }
    end

    describe '#past_event' do
      specify { expect(properties.past_event).to eq 0 }
    end

    describe '#timestamp' do
      specify { expect(properties.timestamp).to eq clock.now.to_i }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
replay_api-0.0.3 spec/replay_api/event_properties_spec.rb