Skip to content
Browse files

Merge pull request #745 from wilkie/bugfix/faster-tests-through-rakefile

Bugfix/faster tests through rakefile
  • Loading branch information...
2 parents 6b6d6d7 + 6d7d797 commit d9255109b617526f9ed086721ebd68251cebda1a @steveklabnik steveklabnik committed Feb 19, 2013
View
2 Gemfile.lock
@@ -145,7 +145,7 @@ GEM
metaclass (0.0.1)
mime-types (1.21)
minitest (4.2.0)
- mocha (0.13.0)
+ mocha (0.13.2)
metaclass (~> 0.0.1)
mongo (1.7.0)
bson (~> 1.7.0)
View
9 Rakefile
@@ -2,6 +2,9 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
-require File.expand_path('../config/application', __FILE__)
-
-RstatUs::Application.load_tasks
+if ARGV[0].start_with?('test')
+ load 'lib/tasks/minitest.rake'
+else
+ require File.expand_path('../config/application', __FILE__)
+ RstatUs::Application.load_tasks
+end
View
2 test/models/finger_data_test.rb
@@ -1,5 +1,5 @@
require 'minitest/autorun'
-require 'mocha'
+require 'mocha/setup'
require_relative '../../app/models/finger_data'
View
4 test/services/feed_service_test.rb
@@ -1,6 +1,6 @@
require_relative '../test_helper'
-require 'mocha'
+require 'mocha/setup'
describe FeedService do
include TestHelper
@@ -84,4 +84,4 @@
end
end
end
-end
+end
View
4 test/services/finger_service_test.rb
@@ -1,5 +1,5 @@
require 'minitest/autorun'
-require 'mocha'
+require 'mocha/setup'
require_relative '../../app/services/finger_service'
require_relative '../../app/models/feed_data'
@@ -73,4 +73,4 @@ class InvalidSubscribeTo < StandardError; end
end
end
end
-end
+end
View
2 test/services/subscriber_to_feed_data_converter_test.rb
@@ -1,5 +1,5 @@
require 'minitest/autorun'
-require 'mocha'
+require 'mocha/setup'
require 'socket'
require_relative '../../app/services/subscriber_to_feed_data_converter'

0 comments on commit d925510

Please sign in to comment.
Something went wrong with that request. Please try again.