Sha256: a35de2ef144af7fa89d4e57c5c3aa0545c782b3d57c1c9e232a425afbc805291

Contents?: true

Size: 449 Bytes

Versions: 7

Compression:

Stored size: 449 Bytes

Contents

module HelperMethods

  def stub_request
    request = double('request')
    allow(Speedup).to receive(:request).and_return(request)

    request
  end

  def stub_adapter
    adapter = double('adapter')
    allow(Speedup).to receive(:adapter).and_return(adapter)
    adapter
  end

  def prepare_event(name, data, duration=1.second)
    ActiveSupport::Notifications::Event.new(name, Time.now-duration, Time.now, SecureRandom.hex, data)
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
speedup-rails-0.0.15 spec/support/helper_methods.rb
speedup-rails-0.0.13 spec/support/helper_methods.rb
speedup-rails-0.0.12 spec/support/helper_methods.rb
speedup-rails-0.0.10 spec/support/helper_methods.rb
speedup-rails-0.0.9 spec/support/helper_methods.rb
speedup-rails-0.0.7 spec/support/helper_methods.rb
speedup-rails-0.0.6 spec/support/helper_methods.rb