Sha256: f76bba8d4dcd3eb0f7eee632c61bfdd0c0885927d2851a7ca8c08851e62297d5

Contents?: true

Size: 364 Bytes

Versions: 11

Compression:

Stored size: 364 Bytes

Contents

module AuditedSpecHelpers

  def create_user(attrs = {})
    User.create({:name => 'Brandon', :username => 'brandon', :password => 'password'}.merge(attrs))
  end

  def create_versions(n = 2)
    User.create(:name => 'Foobar 1').tap do |u|
      (n - 1).times do |i|
        u.update_attribute :name, "Foobar #{i + 2}"
      end
      u.reload
    end
  end

end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/acts_as_audited-2.1.0/spec/audited_spec_helpers.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/acts_as_audited-2.1.0/spec/audited_spec_helpers.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/acts_as_audited-2.1.0/spec/audited_spec_helpers.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/acts_as_audited-2.1.0/spec/audited_spec_helpers.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/acts_as_audited-2.1.0/spec/audited_spec_helpers.rb
acts_as_audited-2.1.0 spec/audited_spec_helpers.rb
acts_as_audited-2.0.0 spec/audited_spec_helpers.rb
acts_as_audited-2.0.0.rc7 spec/audited_spec_helpers.rb
acts_as_audited-2.0.0.rc6 spec/audited_spec_helpers.rb
acts_as_audited-2.0.0.rc5 spec/audited_spec_helpers.rb
acts_as_audited-2.0.0.rc4 spec/audited_spec_helpers.rb