diff --git a/lib/shoulda.rb b/lib/shoulda.rb index 04c6ed5f..816c3efa 100644 --- a/lib/shoulda.rb +++ b/lib/shoulda.rb @@ -2,6 +2,7 @@ require 'shoulda/context' require 'shoulda/proc_extensions' require 'shoulda/assertions' require 'shoulda/macros' +require 'shoulda/helpers' module Test # :nodoc: all module Unit @@ -9,11 +10,11 @@ module Test # :nodoc: all extend Thoughtbot::Shoulda include ThoughtBot::Shoulda::Assertions extend ThoughtBot::Shoulda::Macros + include ThoughtBot::Shoulda::Helpers end end end -require 'shoulda/general' require 'shoulda/active_record' require 'shoulda/controller' require 'shoulda/action_mailer' @@ -35,19 +36,3 @@ possible_config_paths.each do |config_file| end require 'shoulda/color' if shoulda_options[:color] - -module Test # :nodoc: all - module Unit - class TestCase - include ThoughtBot::Shoulda::General - end - end -end - -module ActionController #:nodoc: all - module Integration - class Session - include ThoughtBot::Shoulda::General - end - end -end diff --git a/lib/shoulda/controller.rb b/lib/shoulda/controller.rb index d4e11854..edda43bf 100644 --- a/lib/shoulda/controller.rb +++ b/lib/shoulda/controller.rb @@ -13,3 +13,17 @@ module Test # :nodoc: all end end end + +require 'shoulda/active_record/assertions' +require 'shoulda/action_mailer/assertions' + +module ActionController #:nodoc: all + module Integration + class Session + include ThoughtBot::Shoulda::Assertions + include ThoughtBot::Shoulda::Helpers + include ThoughtBot::Shoulda::ActiveRecord::Assertions + include ThoughtBot::Shoulda::ActionMailer::Assertions + end + end +end diff --git a/lib/shoulda/general.rb b/lib/shoulda/helpers.rb similarity index 92% rename from lib/shoulda/general.rb rename to lib/shoulda/helpers.rb index edd59799..52da45ad 100644 --- a/lib/shoulda/general.rb +++ b/lib/shoulda/helpers.rb @@ -1,6 +1,6 @@ module ThoughtBot # :nodoc: module Shoulda # :nodoc: - module General + module Helpers # Prints a message to stdout, tagged with the name of the calling method. def report!(msg = "") puts("#{caller.first}: #{msg}")