Sha256: 175a740cdd9cbdea609f7982772be044122c99415732f5f73249c2e99388ff8c

Contents?: true

Size: 438 Bytes

Versions: 5

Compression:

Stored size: 438 Bytes

Contents

require 'rack/test'

module Helpers
  def build_app(options={})
    StackProf::Webnav::Server.cmd_options = options
    Rack::Test::Session.new(Rack::MockSession.new(StackProf::Webnav::Server))
  end

  def fixture_path(name)
    File.join(File.dirname(__FILE__), "fixtures", name)
  end

  def build_presenter(path)
    report = StackProf::Report.new(Marshal.load(File.read(path)))
    StackProf::Webnav::Presenter.new(report)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stackprof-webnav-1.0.4 spec/helpers.rb
stackprof-webnav-1.0.3 spec/helpers.rb
stackprof-webnav-1.0.2 spec/helpers.rb
stackprof-webnav-1.0.1 spec/helpers.rb
stackprof-webnav-1.0.0 spec/helpers.rb