Sha256: 364a6f6ce00708e5578c29f028bbc3c10ad46daf49a0762039c4f3e66f3b102c

Contents?: true

Size: 616 Bytes

Versions: 3

Compression:

Stored size: 616 Bytes

Contents

require 'spec_helper'
require 'derketo/tracer'

describe Derketo::Event do

  let(:tracer) { Derketo::Tracer.new }
  let(:example) {
    m = Mermaid.new
    tracer.trace {
      m.sing
    }
  }
  let(:event) { tracer.events.first }

  before(:each) { example }

  describe '#to_h' do
    it 'returns a Hash' do
      expect(event.to_h.class).to eq(Hash)
    end
  end

  describe '#to_json' do
    it 'returns a JSON formatted String' do
      expect(event.to_json.class).to eq(String)
    end
  end

  describe '#to_s' do
    it 'returns a String' do
      expect(event.to_s.class).to eq(String)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
derketo-0.1.2 spec/derketo/events/event_spec.rb
derketo-0.1.1 spec/derketo/events/event_spec.rb
derketo-0.1.0 spec/derketo/events/event_spec.rb