Sha256: dc53dd2e0850ea9bbb81203df0e8c74862ddd84667fd5e6b7604146fc0ec7869

Contents?: true

Size: 564 Bytes

Versions: 2

Compression:

Stored size: 564 Bytes

Contents

require 'simplecov'

if ENV["RUN_SIMPLECOV"] == 'true'
  SimpleCov.start do
    load_adapter 'test_frameworks'
  end
end

require 'validates_formatting_of'
require 'active_model'

class TestActiveRecord

  include ActiveModel::Validations
  include ValidatesFormattingOf::Validations
  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

2 entries across 2 versions & 1 rubygems

Version Path
validates_formatting_of-0.8.1 spec/spec_helper.rb
validates_formatting_of-0.8.0 spec/spec_helper.rb