Sha256: d43e9bb64fc2afc57bf964ae4b9bb4284e85ec7b8d7b2e9a8d60acc60c9e27bb

Contents?: true

Size: 558 Bytes

Versions: 1

Compression:

Stored size: 558 Bytes

Contents

require 'simplecov'

unless ENV["SKIP_SIMPLECOV"] == 'true'
  SimpleCov.start do
    load_adapter 'test_frameworks'
  end
end

require 'validates_formatting_of'
require 'active_model'

class TestActiveRecord
  include ActiveModel::Validations
  include ActiveModel::Conversion

  extend ValidatesFormattingOf::ModelAdditions

  def initialize(attributes = {})
    attributes.each do |name, value|
      send("#{name}=", value)
    end
    @persisted = false
  end

  def save
    @persisted = true
  end

  def persisted?
    @persisted ||= false
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
validates_formatting_of-0.7.0 spec/spec_helper.rb