Sha256: e83938f5f574cd6a2e2d91525179a388f9bbfa957f1d34756600ca9504700302
Contents?: true
Size: 573 Bytes
Versions: 5
Compression:
Stored size: 573 Bytes
Contents
require 'rspec' require 'active_model' require 'fakeweb' require File.dirname(__FILE__) + '/../lib/valvat.rb' $fakeweb = true 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 def without_any_web_requests! before(:all) do FakeWeb.clean_registry FakeWeb.allow_net_connect = false end after(:all) do FakeWeb.allow_net_connect = true end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
valvat-0.4.1 | spec/spec_helper.rb |
valvat-0.4.0 | spec/spec_helper.rb |
valvat-0.3.6 | spec/spec_helper.rb |
valvat-0.3.5 | spec/spec_helper.rb |
valvat-0.3.4 | spec/spec_helper.rb |