Sha256: 573c4d7628d29205742df4c276d52263597d9827bee585ff04c075d44f44d6ee
Contents?: true
Size: 754 Bytes
Versions: 17
Compression:
Stored size: 754 Bytes
Contents
require 'faker' FactoryGirl.define do factory :request, :class => ActionDispatch::Request do |r| trait :wiselinks do after(:build) do |obj| obj.env['X-Wiselinks'] = Faker::Lorem.characters(10) end end trait :wiselinks_template do after(:build) do |obj| obj.env['X-Wiselinks'] = 'template' end end trait :wiselinks_partial do after(:build) do |obj| obj.env['X-Wiselinks'] = 'partial' end end initialize_with{ new(Rack::MockRequest.env_for('/')) } factory :wiselinks_request, traits: [:wiselinks] factory :wiselinks_template_request, traits: [:wiselinks_template] factory :wiselinks_partial_request, traits: [:wiselinks_partial] end end
Version data entries
17 entries across 17 versions & 2 rubygems