Sha256: d6637dbef6688308eb4202b116de0d0d17f06a3ca0b7c2a9e0d09c3ba0f81295

Contents?: true

Size: 806 Bytes

Versions: 108

Compression:

Stored size: 806 Bytes

Contents

module EnvHelpers
  def http_request_env_with_data(args = {})
    path = args.delete(:path) || "/blog"
    Rack::MockRequest.env_for(
      path,
      :params => args[:params] || {
        "controller" => "blog_posts",
        "action" => "show",
        "id" => "1"
      }
    ).merge(
      :controller => "BlogPostsController",
      :action => "show",
      :request_format => "html",
      :request_method => "GET",
      :status => "200",
      :view_runtime => 500,
      :db_runtime => 500,
      :metadata => { :key => "value" }
    ).merge(args)
  end

  def background_env_with_data(args = {})
    {
      :class => "BackgroundJob",
      :method => "perform",
      :priority => 1,
      :attempts => 0,
      :queue => "default",
      :queue_start => fixed_time
    }.merge(args)
  end
end

Version data entries

108 entries across 108 versions & 1 rubygems

Version Path
appsignal-3.1.2-java spec/support/helpers/env_helpers.rb
appsignal-3.1.2 spec/support/helpers/env_helpers.rb
appsignal-3.1.1-java spec/support/helpers/env_helpers.rb
appsignal-3.1.1 spec/support/helpers/env_helpers.rb
appsignal-3.1.0-java spec/support/helpers/env_helpers.rb
appsignal-3.1.0 spec/support/helpers/env_helpers.rb
appsignal-3.0.27-java spec/support/helpers/env_helpers.rb
appsignal-3.0.27 spec/support/helpers/env_helpers.rb
appsignal-3.0.26-java spec/support/helpers/env_helpers.rb
appsignal-3.0.26 spec/support/helpers/env_helpers.rb
appsignal-3.0.25-java spec/support/helpers/env_helpers.rb
appsignal-3.0.25 spec/support/helpers/env_helpers.rb
appsignal-3.0.24-java spec/support/helpers/env_helpers.rb
appsignal-3.0.24 spec/support/helpers/env_helpers.rb
appsignal-3.0.23-java spec/support/helpers/env_helpers.rb
appsignal-3.0.23 spec/support/helpers/env_helpers.rb
appsignal-3.0.22-java spec/support/helpers/env_helpers.rb
appsignal-3.0.22 spec/support/helpers/env_helpers.rb
appsignal-3.0.21-java spec/support/helpers/env_helpers.rb
appsignal-3.0.21 spec/support/helpers/env_helpers.rb