Sha256: 01e6d3baec37bdf4656d811656c0530c7fa407f80c8100a6a2c6d7eb32db203f
Contents?: true
Size: 851 Bytes
Versions: 1
Compression:
Stored size: 851 Bytes
Contents
require 'rspec' require 'active_model' require 'fakeweb' require File.dirname(__FILE__) + '/../lib/valvat.rb' $fakeweb = true RSpec.configure do |config| config.mock_with :rspec config.treat_symbols_as_metadata_keys_with_true_values = true config.filter_run :focus => true config.run_all_when_everything_filtered = true config.backtrace_exclusion_patterns = [/rspec\/(core|expectations)/] end 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
valvat-0.5.0 | spec/spec_helper.rb |