Browse files

configure minitest for controller tests

  • Loading branch information...
1 parent 249245a commit 344af404b57b0364ba07ce1a5671ed83661676b4 @demental demental committed Dec 7, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 test/minitest_helper.rb
View
7 test/minitest_helper.rb
@@ -6,6 +6,8 @@
require 'database_cleaner'
# require 'mocha'
+Dir[Rails.root.join("test/support/**/*.rb")].each { |f| require f }
+
DatabaseCleaner.strategy = :truncation
class MiniTest::Spec
@@ -27,7 +29,12 @@ class MiniTest::Spec
class ControllerSpec < MiniTest::Spec
include Rails.application.routes.url_helpers
include ActionController::TestCase::Behavior
+ include ActiveSupport::Testing::Assertions
+ include ControllerMacros
+ def build_message(*args)
+ args[1].gsub(/\?/, '%s') % args[2..-1]
+ end
class << self
alias :context :describe
end

0 comments on commit 344af40

Please sign in to comment.