Sha256: 0c473da0177edde672a5b10cd5bf960096167321f4eecd14c1577f121be351e2

Contents?: true

Size: 1006 Bytes

Versions: 14

Compression:

Stored size: 1006 Bytes

Contents

FactoryGirl.define do
  
  factory :unpublished_team_member, class: Dhatu::TeamMember do
    
    name "Some Name"
    designation "Some Designation"
    description "Some Description"
    
    linked_in_url "linkedin.com/somename"
    google_plus_url "google.com/somename"
    facebook_url "google.com/somename"
    twitter_url "google.com/somename"

  end

  factory :published_team_member, parent: :unpublished_team_member do
    after :build do |e|
      e.publish
    end
  end

  factory :removed_team_member, parent: :unpublished_team_member do
    after :build do |e|
      e.remove
    end
  end

  factory :archived_team_member, parent: :unpublished_team_member do
    after :build do |e|
      e.archive
    end
  end

  factory :featured_team_member, parent: :published_team_member do
    after :build do |e|
      e.mark_as_featured
    end
  end

  factory :non_featured_team_member, parent: :published_team_member do
    after :build do |e|
      e.remove_from_featured
    end
  end

  
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
dhatu-0.1.13 spec/dummy/spec/factories/team_member.rb
dhatu-0.1.12 spec/dummy/spec/factories/team_member.rb
dhatu-0.1.11 spec/dummy/spec/factories/team_member.rb
dhatu-0.1.10 spec/dummy/spec/factories/team_member.rb
dhatu-0.1.9 spec/dummy/spec/factories/team_member.rb
dhatu-0.1.8 spec/dummy/spec/factories/team_member.rb
dhatu-0.1.7 spec/dummy/spec/factories/team_member.rb
dhatu-0.1.6 spec/dummy/spec/factories/team_member.rb
dhatu-0.1.5 spec/dummy/spec/factories/team_member.rb
dhatu-0.1.4 spec/dummy/spec/factories/team_member.rb
dhatu-0.1.3 spec/dummy/spec/factories/team_member.rb
dhatu-0.1.2 spec/dummy/spec/factories/team_member.rb
dhatu-0.1.1 spec/dummy/spec/factories/team_member.rb
dhatu-0.1.0 spec/dummy/spec/factories/team_member.rb