Sha256: f320ba9bdc5c45081f813023c5732abcc7c7a8c8aaf10f6b23649bd3b9336c89
Contents?: true
Size: 796 Bytes
Versions: 8
Compression:
Stored size: 796 Bytes
Contents
module EnvHelpers def http_request_env_with_data(args = {}) path = args.delete(:path) || "/blog" Rack::MockRequest.env_for( path, :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 - 10.0 }.merge(args) end end
Version data entries
8 entries across 8 versions & 1 rubygems