public
Rubygem
Description: Makes tests easy on the fingers and the eyes
Homepage: http://www.thoughtbot.com/projects/shoulda
Clone URL: git://github.com/thoughtbot/shoulda.git
shoulda / lib / shoulda.rb
100644 27 lines (20 sloc) 0.694 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require 'active_record_helpers'
require 'context'
require 'general'
require 'yaml'
 
config_file = "shoulda.conf"
config_file = defined?(RAILS_ROOT) ? File.join(RAILS_ROOT, "test", "shoulda.conf") : File.join("test", "shoulda.conf")
 
tb_test_options = (YAML.load_file(config_file) rescue {}).symbolize_keys
require 'color' if tb_test_options[:color]
 
module Test # :nodoc:
  module Unit # :nodoc:
    class TestCase # :nodoc:
 
      include ThoughtBot::Shoulda::General::InstanceMethods
 
      class << self
        include ThoughtBot::Shoulda::Context
        include ThoughtBot::Shoulda::ActiveRecord
        include ThoughtBot::Shoulda::General::ClassMethods
      end
    end
  end
end