Permalink
Browse files

Sporkify.

  • Loading branch information...
1 parent 0c02a8e commit ebeab467e5a070636adb338797e7fe879c13ccf7 Gabe Berke-Williams committed Nov 16, 2011
Showing with 21 additions and 13 deletions.
  1. +1 −0 fake_braintree.gemspec
  2. +20 −13 spec/spec_helper.rb
View
@@ -26,4 +26,5 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rspec', '~> 2.6.0'
s.add_development_dependency 'mocha', '~> 0.9.12'
s.add_development_dependency 'timecop', '~> 0.3.5'
+ s.add_development_dependency 'spork', '~> 0.9.0.rc9'
end
View
@@ -1,19 +1,26 @@
-# Requires supporting ruby files with custom matchers and macros, etc,
-# in spec/support/ and its subdirectories.
-require 'rspec'
-require 'fake_braintree'
-require 'timecop'
-Dir[File.join(File.dirname(__FILE__), "support/**/*.rb")].each {|f| require f}
+require 'spork'
-Dir.mkdir('tmp') unless Dir.exist?('tmp')
-File.new('tmp/braintree_log', 'w').close
+Spork.prefork do
+ # Requires supporting ruby files with custom matchers and macros, etc,
+ # in spec/support/ and its subdirectories.
+ require 'rspec'
+ require 'fake_braintree'
+ require 'timecop'
+ Dir[File.join(File.dirname(__FILE__), "support/**/*.rb")].each {|f| require f}
-TEST_CC_NUMBER = %w(4111 1111 1111 1111).join
+ Dir.mkdir('tmp') unless Dir.exist?('tmp')
+ File.new('tmp/braintree_log', 'w').close
-RSpec.configure do |config|
- config.mock_with :mocha
+ TEST_CC_NUMBER = %w(4111 1111 1111 1111).join
- config.include BraintreeHelpers
+ RSpec.configure do |config|
+ config.mock_with :mocha
- config.before { FakeBraintree.clear! }
+ config.include BraintreeHelpers
+
+ config.before { FakeBraintree.clear! }
+ end
+end
+
+Spork.each_run do
end

0 comments on commit ebeab46

Please sign in to comment.