Sha256: f576c4d18af7476a3e34b0a900ca47d241bd0481348ef08b178f36d6c9f14d08
Contents?: true
Size: 737 Bytes
Versions: 16
Compression:
Stored size: 737 Bytes
Contents
# Read about factories at https://github.com/thoughtbot/factory_girl FactoryGirl.define do factory :page, class: 'Landable::Page' do association :theme, strategy: :build association :category sequence(:path) { |n| "/page-#{n}" } sequence(:title) { |n| "Page #{n}" } body "<div>Page body</div>" head_content "<link rel='alternate' type='application/rss+xml' title='RSS' href='/rss'>" # Anyone see a more reasonable way to unset these attributes? trait :redirect do status_code 301 redirect_url "http://www.redirect.com" theme nil title nil body nil end trait :gone do status_code 410 theme nil title nil body nil end end end
Version data entries
16 entries across 16 versions & 1 rubygems