Sha256: 06a83dc2dfc634aa08c940201c43c1cfb4134029fe7498139a66a7ca610bcb1b

Contents?: true

Size: 640 Bytes

Versions: 4

Compression:

Stored size: 640 Bytes

Contents

require 'spec_helper'
require 'rack-mini-profiler'

describe Rack::MiniProfiler::PageTimerStruct do

  before do
    @page = Rack::MiniProfiler::PageTimerStruct.new({})
  end

  it 'has an Id' do
    @page['Id'].should_not be_nil
  end

  it 'has a Root' do
    @page['Root'].should_not be_nil
  end

  describe 'to_json' do
    before do
      @json = @page.to_json
      @deserialized = ::JSON.parse(@json)
    end

    it 'has a Started element' do
      @deserialized['Started'].should_not be_nil
    end

    it 'has a DurationMilliseconds element' do
      @deserialized['DurationMilliseconds'].should_not be_nil
    end
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
miniprofiler-0.1.7.4 spec/components/page_timer_struct_spec.rb
miniprofiler-0.1.7.3 spec/components/page_timer_struct_spec.rb
miniprofiler-0.1.7.2 spec/components/page_timer_struct_spec.rb
miniprofiler-0.1.7.1 spec/components/page_timer_struct_spec.rb