Sha256: cc5231afd30131ca3e2eb2b5b9ffba5cdc4e810ebbcb01d569392e02b66d9aa0

Contents?: true

Size: 1.07 KB

Versions: 25

Compression:

Stored size: 1.07 KB

Contents

FactoryBot.define do
  
  factory :unpublished_testimonial, class: Dhatu::Testimonial do
    
    name "Dr. Dennis Ritchie"
    designation "Sr. Scientist"
    organisation "Bell Laboratories"
    featured false
    statement "Bando Chemical Industries, with 17 plants in 15 countries, is headquartered in Kobe, Japan and for more than 100 years has been pioneering technologies and development of all types of power transmission products."

  end

  factory :published_testimonial, parent: :unpublished_testimonial do
    after :build do |e|
      e.publish
    end
  end

  factory :removed_testimonial, parent: :unpublished_testimonial do
    after :build do |e|
      e.remove
    end
  end

  factory :archived_testimonial, parent: :unpublished_testimonial do
    after :build do |e|
      e.archive
    end
  end

  factory :featured_testimonial, parent: :published_testimonial do
    after :build do |e|
      e.mark_as_featured
    end
  end

  factory :non_featured_testimonial, parent: :published_testimonial do
    after :build do |e|
      e.remove_from_featured
    end
  end

  
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
dhatu-0.3.9.pre.materialize spec/dummy/spec/factories/testimonial.rb
dhatu-0.3.8.pre.materialize spec/dummy/spec/factories/testimonial.rb
dhatu-0.3.7.pre.materialize spec/dummy/spec/factories/testimonial.rb
dhatu-0.3.6.pre.materialize spec/dummy/spec/factories/testimonial.rb
dhatu-0.3.5.pre.materialize spec/dummy/spec/factories/testimonial.rb
dhatu-0.3.4.pre.materialize spec/dummy/spec/factories/testimonial.rb
dhatu-0.3.3.pre.materialize spec/dummy/spec/factories/testimonial.rb
dhatu-0.3.2.pre.materialize spec/dummy/spec/factories/testimonial.rb
dhatu-0.3.1.pre.materialize spec/dummy/spec/factories/testimonial.rb
dhatu-0.3.0.pre.materialize spec/dummy/spec/factories/testimonial.rb
dhatu-0.2.3 spec/dummy/spec/factories/testimonial.rb
dhatu-0.2.2 spec/dummy/spec/factories/testimonial.rb
dhatu-0.2.1 spec/dummy/spec/factories/testimonial.rb
dhatu-0.2.0 spec/dummy/spec/factories/testimonial.rb
dhatu-0.1.25 spec/dummy/spec/factories/testimonial.rb
dhatu-0.1.24 spec/dummy/spec/factories/testimonial.rb
dhatu-0.1.23 spec/dummy/spec/factories/testimonial.rb
dhatu-0.1.22 spec/dummy/spec/factories/testimonial.rb
dhatu-0.1.21 spec/dummy/spec/factories/testimonial.rb
dhatu-0.1.20 spec/dummy/spec/factories/testimonial.rb