Sha256: a03ef7dc31b62212be51bb0e6123e36f5ce1fbfe4874df6f2e8e4a011cdf90c1

Contents?: true

Size: 610 Bytes

Versions: 9

Compression:

Stored size: 610 Bytes

Contents

# encoding: utf-8
if Object.const_defined?("Audited")
  FactoryGirl.define do
    factory :audit, :class => Audited.audit_class do |a|
      a.action "create"
      a.audited_changes :title => "Updated"
      a.association :user, :factory => :default_user
      a.association :auditable, :factory => :post
    end
  end
else
  FactoryGirl.define do
    factory :audit, :class => HistoryTracker do
      action "create"
      modified :title => "Updated"
      original :title => "original"
      version 1

      after(:build) do |a| 
        a.trackable = FactoryGirl.create(:post)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sunrise-cms-0.5.3 spec/factories/audit_factory.rb
sunrise-cms-0.5.2 spec/factories/audit_factory.rb
sunrise-cms-0.5.1 spec/factories/audit_factory.rb
sunrise-cms-0.5.0 spec/factories/audit_factory.rb
sunrise-cms-0.5.0.rc5 spec/factories/audit_factory.rb
sunrise-cms-0.5.0.rc4 spec/factories/audit_factory.rb
sunrise-cms-0.5.0.rc3 spec/factories/audit_factory.rb
sunrise-cms-0.5.0.rc2 spec/factories/audit_factory.rb
sunrise-cms-0.5.0.rc1 spec/factories/audit_factory.rb