Sha256: dd3b6e1d3a12b22d0f1ffce2b9f82dea5043f2f53f23ce6e7c36e70adea4ff60
Contents?: true
Size: 1.39 KB
Versions: 5
Compression:
Stored size: 1.39 KB
Contents
require 'test/unit' require 'pathname' require 'rubygems' gem 'thoughtbot-shoulda', '>= 2.10.1' gem 'jnunemaker-matchy', '0.4.0' gem 'mocha', '0.9.4' gem 'fakeweb', '>= 1.2.5' require 'shoulda' require 'matchy' require 'mocha' require 'fakeweb' $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'chargify' class Test::Unit::TestCase end FakeWeb.allow_net_connect = false class Test::Unit::TestCase end def fixture_file(filename) return '' if filename == '' file_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename) File.read(file_path) end def stub_get(url, filename, status=nil) options = {:body => fixture_file(filename)} options.merge!({:status => status}) unless status.nil? FakeWeb.register_uri(:get, url, options) end def stub_post(url, filename, status=nil) options = {:body => fixture_file(filename)} options.merge!({:status => status}) unless status.nil? FakeWeb.register_uri(:post, url, options) end def stub_put(url, filename, status=nil) options = {:body => fixture_file(filename)} options.merge!({:status => status}) unless status.nil? FakeWeb.register_uri(:put, url, options) end def stub_delete(url, filename, status=nil) options = {:body => fixture_file(filename)} options.merge!({:status => status}) unless status.nil? FakeWeb.register_uri(:delete, url, options) end
Version data entries
5 entries across 5 versions & 2 rubygems
Version | Path |
---|---|
chargify-0.2.3 | test/helper.rb |
chargify-0.2.2 | test/helper.rb |
fizx-chargify-0.2.1 | test/helper.rb |
chargify-0.2.1 | test/helper.rb |
chargify-0.2.0 | test/helper.rb |