Sha256: 57b76a41b16a2463700841565966c380c7e4ac38736120af9eac12564dbb1315

Contents?: true

Size: 773 Bytes

Versions: 13

Compression:

Stored size: 773 Bytes

Contents

require 'rspec'
begin
  require 'active_model'
rescue LoadError => err
  puts "Running specs without active_model extension"
end

require File.dirname(__FILE__) + '/../lib/valvat.rb'

RSpec.configure do |config|
  config.mock_with :rspec
  config.filter_run :focus => true
  config.run_all_when_everything_filtered = true
  config.backtrace_exclusion_patterns = [/rspec\/(core|expectations)/]
end

if defined?(I18n)
  I18n.enforce_available_locales = false
end

if defined?(ActiveModel)
  class ModelBase
    include ActiveModel::Serialization
    include ActiveModel::Validations

    attr_accessor :attributes

    def initialize(attributes = {})
      @attributes = attributes
    end

    def read_attribute_for_validation(key)
      @attributes[key]
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
valvat-1.0.1 spec/spec_helper.rb
valvat-1.0.0 spec/spec_helper.rb
valvat-0.9.1 spec/spec_helper.rb
valvat-0.9.0 spec/spec_helper.rb
valvat-0.8.2 spec/spec_helper.rb
valvat-0.8.1 spec/spec_helper.rb
valvat-0.8.0 spec/spec_helper.rb
valvat-0.7.4 spec/spec_helper.rb
valvat-0.7.3 spec/spec_helper.rb
valvat-0.7.2 spec/spec_helper.rb
valvat-0.7.1 spec/spec_helper.rb
valvat-0.7.0 spec/spec_helper.rb
valvat-0.6.11 spec/spec_helper.rb