Sha256: 22e290cc990c8999d4e25b2fc21a2d540908dcaa3dc02d83a93cc53d861adfb6

Contents?: true

Size: 519 Bytes

Versions: 2

Compression:

Stored size: 519 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
  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.7.2 spec/spec_helper.rb
validates_formatting_of-0.7.1 spec/spec_helper.rb