Sha256: 6f19a566b7575ea1f67978481a73f6c01a68901a365e624cb35bf715261fb198

Contents?: true

Size: 580 Bytes

Versions: 3

Compression:

Stored size: 580 Bytes

Contents

require 'spec_helper'

RSpec.describe Appdash::Event::Base do

  subject { described_class.new 'test', name: "Query", some_other: 2, sub: { req_url: "http://example.com/path", nest: { v: Time.utc(2015) }}}

  it "should init" do
    expect(subject.schema).to eq("test")
    expect(subject.attrs.size).to eq(3)
  end

  it "should annotate" do
    expect(atoh(subject.to_a)).to eq(
      "Name" => "Query",
      "SomeOther" => "2",
      "Sub.ReqURL" => "http://example.com/path",
      "Sub.Nest.V"=>"2015-01-01T00:00:00.000000+00:00",
      "_schema:test"=>"",
    )
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
appdash-0.6.3 spec/appdash/event/base_spec.rb
appdash-0.6.2 spec/appdash/event/base_spec.rb
appdash-0.6.1 spec/appdash/event/base_spec.rb