hardmock 1.3.7 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +5 -0
 - data/{README → README.rdoc} +20 -7
 - data/Rakefile +1 -1
 - data/lib/hardmock/mock_control.rb +0 -1
 - data/lib/hardmock/stubbing.rb +3 -4
 - data/lib/test_unit_before_after.rb +94 -37
 - data/rake_tasks/rdoc.rake +1 -1
 - data/rake_tasks/rdoc_options.rb +1 -1
 - data/test/functional/assert_error_test.rb +10 -3
 - data/test/unit/expectation_test.rb +5 -1
 - data/test/unit/method_cleanout_test.rb +8 -6
 - data/test/unit/test_unit_before_after_test.rb +94 -45
 - metadata +18 -9
 
    
        data/CHANGES
    CHANGED
    
    | 
         @@ -1,3 +1,8 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            Hardmock 1.3.8
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            * Ruby 1.9 compatibility: patched stubbing module and tests to get Hardmock working in Ruby 1.9.2 and MiniTest
         
     | 
| 
      
 4 
     | 
    
         
            +
            * FINAL VERSION OF HARDMOCK -- see Readme
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
       1 
6 
     | 
    
         
             
            Hardmock 1.3.7
         
     | 
| 
       2 
7 
     | 
    
         | 
| 
       3 
8 
     | 
    
         
             
            * BUG FIX: expects! could not setup expectations for more than one concrete method on an object, since the method aliasing and rewriting was only taking place when the background mock instance was first created.  This logic has been updated and now you can do all the things you'd expect.
         
     | 
    
        data/{README → README.rdoc}
    RENAMED
    
    | 
         @@ -2,7 +2,16 @@ 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            Strict, ordered mock objects using very lightweight syntax in your tests.
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
     | 
    
         
            -
            ==  
     | 
| 
      
 5 
     | 
    
         
            +
            == DISCONTINUED
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            After release 1.3.8, Hardmock will not be actively maintained.
         
     | 
| 
      
 8 
     | 
    
         
            +
            (1.3.8 is a Ruby 1.9/MiniTest compatibility update, see below).
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            Atomic Object still believes in (and heavily utilizes) mock objects and interaction-based unit testing, however, we ourselves have begun leveraging other popular mocking tools such as RSpec, RR, Mocha, etc.
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            For those of you with time invested in older projects using Hardmock, but who need to migrate their older projects to Ruby 1.9, try updating to Hardmock 1.3.8.
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            == How to use Hardmock
         
     | 
| 
       6 
15 
     | 
    
         | 
| 
       7 
16 
     | 
    
         
             
            The basic procedure for using Hardmock in your tests is:
         
     | 
| 
       8 
17 
     | 
    
         | 
| 
         @@ -40,11 +49,10 @@ Expects <tt>@garage.open_door</tt>, <tt>@car.start(:choke)</tt> and <tt>@car.dri 
     | 
|
| 
       40 
49 
     | 
    
         | 
| 
       41 
50 
     | 
    
         
             
            == Download and Install
         
     | 
| 
       42 
51 
     | 
    
         | 
| 
       43 
     | 
    
         
            -
            *  
     | 
| 
       44 
     | 
    
         
            -
            *  
     | 
| 
       45 
     | 
    
         
            -
            *  
     | 
| 
       46 
     | 
    
         
            -
            *  
     | 
| 
       47 
     | 
    
         
            -
            * Developer SVN access: svn co svn://developername@rubyforge.org/var/svn/hardmock/trunk
         
     | 
| 
      
 52 
     | 
    
         
            +
            * Install: gem install hardmock
         
     | 
| 
      
 53 
     | 
    
         
            +
            * Homepage: http://atomicobject.github.com/hardmock
         
     | 
| 
      
 54 
     | 
    
         
            +
            * Rubygems.org: http://rubygems.org/gems/hardmock
         
     | 
| 
      
 55 
     | 
    
         
            +
            * API documentation: http://rubydoc.info/gems/hardmock/1.3.7/frames
         
     | 
| 
       48 
56 
     | 
    
         | 
| 
       49 
57 
     | 
    
         
             
            == Setup for Test::Unit
         
     | 
| 
       50 
58 
     | 
    
         | 
| 
         @@ -65,7 +73,12 @@ Get this into your spec helper or environment or Rakefile or wherever you prefer 
     | 
|
| 
       65 
73 
     | 
    
         
             
            This puts the implicit conveniences into your spec context, like "create_mocks" etc, and also provides for automatic
         
     | 
| 
       66 
74 
     | 
    
         
             
            "verify_mocks" after each Example is run.
         
     | 
| 
       67 
75 
     | 
    
         | 
| 
      
 76 
     | 
    
         
            +
            == Ruby 1.9 Compatibility
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
      
 78 
     | 
    
         
            +
            As of build 1.3.8, Hardmock works in Ruby 1.9.2.  Older versions of Hardmock had non-1.9 compatible code; furthermore, 1.9 ships with MiniTest, which is similar to TestUnit but has different implementation internals, which we monkey-patch.
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
       68 
80 
     | 
    
         
             
            == Author
         
     | 
| 
       69 
81 
     | 
    
         | 
| 
       70 
82 
     | 
    
         
             
            * David Crosby crosby at http://atomicobject.com
         
     | 
| 
       71 
     | 
    
         
            -
            * (c) 2006 
     | 
| 
      
 83 
     | 
    
         
            +
            * (c) 2006-2011 Atomic Object LLC 
         
     | 
| 
      
 84 
     | 
    
         
            +
             
     | 
    
        data/Rakefile
    CHANGED
    
    
    
        data/lib/hardmock/stubbing.rb
    CHANGED
    
    | 
         @@ -86,9 +86,8 @@ module Hardmock 
     | 
|
| 
       86 
86 
     | 
    
         | 
| 
       87 
87 
     | 
    
         
             
                  stubbed_method = Hardmock::StubbedMethod.new(self, method_name)
         
     | 
| 
       88 
88 
     | 
    
         | 
| 
       89 
     | 
    
         
            -
             
     | 
| 
       90 
89 
     | 
    
         
             
                  unless _is_mock? or already_stubbed
         
     | 
| 
       91 
     | 
    
         
            -
                    if methods.include?(method_name 
     | 
| 
      
 90 
     | 
    
         
            +
                    if methods.map do |m| m.to_s end.include?(method_name)
         
     | 
| 
       92 
91 
     | 
    
         
             
                      hm_meta_eval do 
         
     | 
| 
       93 
92 
     | 
    
         
             
                        alias_method "_hardmock_original_#{method_name}".to_sym, method_name.to_sym
         
     | 
| 
       94 
93 
     | 
    
         
             
                      end
         
     | 
| 
         @@ -116,7 +115,7 @@ module Hardmock 
     | 
|
| 
       116 
115 
     | 
    
         
             
                    Hardmock::ReplacedMethod.new(self, method_name)
         
     | 
| 
       117 
116 
     | 
    
         | 
| 
       118 
117 
     | 
    
         
             
                    # Preserver original implementation of the method by aliasing it away
         
     | 
| 
       119 
     | 
    
         
            -
                    if methods.include?(method_name)
         
     | 
| 
      
 118 
     | 
    
         
            +
                    if methods.map do |m| m.to_s end.include?(method_name.to_s)
         
     | 
| 
       120 
119 
     | 
    
         
             
                      hm_meta_eval do 
         
     | 
| 
       121 
120 
     | 
    
         
             
                        alias_method "_hardmock_original_#{method_name}".to_sym, method_name.to_sym
         
     | 
| 
       122 
121 
     | 
    
         
             
                      end
         
     | 
| 
         @@ -194,7 +193,7 @@ module Hardmock 
     | 
|
| 
       194 
193 
     | 
    
         
             
                  all_replaced_methods.each do |replaced|
         
     | 
| 
       195 
194 
     | 
    
         
             
                    unless replaced.target._is_mock?
         
     | 
| 
       196 
195 
     | 
    
         
             
                      backed_up = "_hardmock_original_#{replaced.method_name}"
         
     | 
| 
       197 
     | 
    
         
            -
                      if replaced.target.methods.include?(backed_up)
         
     | 
| 
      
 196 
     | 
    
         
            +
                      if replaced.target.methods.map do |m| m.to_s end.include?(backed_up)
         
     | 
| 
       198 
197 
     | 
    
         
             
                        replaced.target.hm_meta_eval do
         
     | 
| 
       199 
198 
     | 
    
         
             
                          alias_method replaced.method_name.to_sym, backed_up.to_sym 
         
     | 
| 
       200 
199 
     | 
    
         
             
                        end
         
     | 
| 
         @@ -79,34 +79,80 @@ module Test #:nodoc:# 
     | 
|
| 
       79 
79 
     | 
    
         
             
                    end
         
     | 
| 
       80 
80 
     | 
    
         
             
                  end
         
     | 
| 
       81 
81 
     | 
    
         | 
| 
       82 
     | 
    
         
            -
                   
     | 
| 
       83 
     | 
    
         
            -
             
     | 
| 
       84 
     | 
    
         
            -
             
     | 
| 
       85 
     | 
    
         
            -
                     
     | 
| 
       86 
     | 
    
         
            -
                     
     | 
| 
       87 
     | 
    
         
            -
                     
     | 
| 
       88 
     | 
    
         
            -
                       
     | 
| 
       89 
     | 
    
         
            -
                       
     | 
| 
       90 
     | 
    
         
            -
                      __send__(@method_name)
         
     | 
| 
       91 
     | 
    
         
            -
                    rescue Test::Unit::AssertionFailedError => e
         
     | 
| 
       92 
     | 
    
         
            -
                      add_failure(e.message, auxiliary_backtrace_filter(e.backtrace))
         
     | 
| 
       93 
     | 
    
         
            -
                    rescue Exception
         
     | 
| 
       94 
     | 
    
         
            -
                      raise if should_passthru_exception($!) # See implementation; this is for pre-1.8.6 compat
         
     | 
| 
       95 
     | 
    
         
            -
                      add_error($!)
         
     | 
| 
       96 
     | 
    
         
            -
                    ensure
         
     | 
| 
      
 82 
     | 
    
         
            +
                  if RUBY_VERSION =~ /^1\.8/
         
     | 
| 
      
 83 
     | 
    
         
            +
                    # OVERRIDE FOR RUBY 1.8.x: This is a reimplementation of the default "run", updated to
         
     | 
| 
      
 84 
     | 
    
         
            +
                    # execute actions after teardown. 
         
     | 
| 
      
 85 
     | 
    
         
            +
                    # Only the lines marked with ** are different from the 1.8 
         
     | 
| 
      
 86 
     | 
    
         
            +
                    # implementation of TestCase#run.
         
     | 
| 
      
 87 
     | 
    
         
            +
                    def run(result)
         
     | 
| 
      
 88 
     | 
    
         
            +
                      yield(STARTED, name)
         
     | 
| 
      
 89 
     | 
    
         
            +
                      @_result = result
         
     | 
| 
       97 
90 
     | 
    
         
             
                      begin
         
     | 
| 
       98 
     | 
    
         
            -
                         
     | 
| 
      
 91 
     | 
    
         
            +
                        execute_pre_setup_actions(self) # ** Added to support TestCaseBeforeAfter
         
     | 
| 
      
 92 
     | 
    
         
            +
                        setup
         
     | 
| 
      
 93 
     | 
    
         
            +
                        __send__(@method_name)
         
     | 
| 
       99 
94 
     | 
    
         
             
                      rescue Test::Unit::AssertionFailedError => e
         
     | 
| 
       100 
95 
     | 
    
         
             
                        add_failure(e.message, auxiliary_backtrace_filter(e.backtrace))
         
     | 
| 
       101 
96 
     | 
    
         
             
                      rescue Exception
         
     | 
| 
       102 
97 
     | 
    
         
             
                        raise if should_passthru_exception($!) # See implementation; this is for pre-1.8.6 compat
         
     | 
| 
       103 
98 
     | 
    
         
             
                        add_error($!)
         
     | 
| 
       104 
99 
     | 
    
         
             
                      ensure
         
     | 
| 
       105 
     | 
    
         
            -
                         
     | 
| 
      
 100 
     | 
    
         
            +
                        begin
         
     | 
| 
      
 101 
     | 
    
         
            +
                          teardown
         
     | 
| 
      
 102 
     | 
    
         
            +
                        rescue Test::Unit::AssertionFailedError => e
         
     | 
| 
      
 103 
     | 
    
         
            +
                          add_failure(e.message, auxiliary_backtrace_filter(e.backtrace))
         
     | 
| 
      
 104 
     | 
    
         
            +
                        rescue Exception
         
     | 
| 
      
 105 
     | 
    
         
            +
                          raise if should_passthru_exception($!) # See implementation; this is for pre-1.8.6 compat
         
     | 
| 
      
 106 
     | 
    
         
            +
                          add_error($!)
         
     | 
| 
      
 107 
     | 
    
         
            +
                        ensure
         
     | 
| 
      
 108 
     | 
    
         
            +
                          execute_post_teardown_actions(self) # ** Added to support TestCaseBeforeAfter
         
     | 
| 
      
 109 
     | 
    
         
            +
                        end
         
     | 
| 
       106 
110 
     | 
    
         
             
                      end
         
     | 
| 
      
 111 
     | 
    
         
            +
                      result.add_run
         
     | 
| 
      
 112 
     | 
    
         
            +
                      yield(FINISHED, name)
         
     | 
| 
      
 113 
     | 
    
         
            +
                    end
         
     | 
| 
      
 114 
     | 
    
         
            +
             
     | 
| 
      
 115 
     | 
    
         
            +
                  elsif RUBY_VERSION =~ /^1\.9/
         
     | 
| 
      
 116 
     | 
    
         
            +
             
     | 
| 
      
 117 
     | 
    
         
            +
                    # OVERRIDE FOR RUBY 1.9.x: This is a reimplementation of the default "run", updated to
         
     | 
| 
      
 118 
     | 
    
         
            +
                    # support execution of actions before setup after teardown. 
         
     | 
| 
      
 119 
     | 
    
         
            +
                    # Only the lines marked with ** are different from the MiniTest implementation of TestCase#run.
         
     | 
| 
      
 120 
     | 
    
         
            +
                    # (Ruby 1.9 ships with MiniTest which is similar to TestUnit in structure but
         
     | 
| 
      
 121 
     | 
    
         
            +
                    # with a different implementation of TestCase#run)
         
     | 
| 
      
 122 
     | 
    
         
            +
                    def run runner
         
     | 
| 
      
 123 
     | 
    
         
            +
                      trap 'INFO' do
         
     | 
| 
      
 124 
     | 
    
         
            +
                        warn '%s#%s %.2fs' % [self.class, self.__name__,
         
     | 
| 
      
 125 
     | 
    
         
            +
                          (Time.now - runner.start_time)]
         
     | 
| 
      
 126 
     | 
    
         
            +
                        runner.status $stderr
         
     | 
| 
      
 127 
     | 
    
         
            +
                      end if SUPPORTS_INFO_SIGNAL
         
     | 
| 
      
 128 
     | 
    
         
            +
             
     | 
| 
      
 129 
     | 
    
         
            +
                      result = '.'
         
     | 
| 
      
 130 
     | 
    
         
            +
                      begin
         
     | 
| 
      
 131 
     | 
    
         
            +
                        @passed = nil
         
     | 
| 
      
 132 
     | 
    
         
            +
                        execute_pre_setup_actions(self, runner) # ** Added to support TestCaseBeforeAfter
         
     | 
| 
      
 133 
     | 
    
         
            +
                        self.setup
         
     | 
| 
      
 134 
     | 
    
         
            +
                        self.__send__ self.__name__
         
     | 
| 
      
 135 
     | 
    
         
            +
                        @passed = true
         
     | 
| 
      
 136 
     | 
    
         
            +
                      rescue *PASSTHROUGH_EXCEPTIONS
         
     | 
| 
      
 137 
     | 
    
         
            +
                        raise
         
     | 
| 
      
 138 
     | 
    
         
            +
                      rescue Exception => e
         
     | 
| 
      
 139 
     | 
    
         
            +
                        @passed = false
         
     | 
| 
      
 140 
     | 
    
         
            +
                        result = runner.puke(self.class, self.__name__, e)
         
     | 
| 
      
 141 
     | 
    
         
            +
                      ensure
         
     | 
| 
      
 142 
     | 
    
         
            +
                        begin
         
     | 
| 
      
 143 
     | 
    
         
            +
                          self.teardown
         
     | 
| 
      
 144 
     | 
    
         
            +
                        rescue *PASSTHROUGH_EXCEPTIONS
         
     | 
| 
      
 145 
     | 
    
         
            +
                          raise
         
     | 
| 
      
 146 
     | 
    
         
            +
                        rescue Exception => e
         
     | 
| 
      
 147 
     | 
    
         
            +
                          result = runner.puke(self.class, self.__name__, e)
         
     | 
| 
      
 148 
     | 
    
         
            +
                        ensure
         
     | 
| 
      
 149 
     | 
    
         
            +
                          result2 = execute_post_teardown_actions(self, runner) # ** Added to support TestCaseBeforeAfter
         
     | 
| 
      
 150 
     | 
    
         
            +
                          #result ||= result2
         
     | 
| 
      
 151 
     | 
    
         
            +
                        end
         
     | 
| 
      
 152 
     | 
    
         
            +
                        trap 'INFO', 'DEFAULT' if SUPPORTS_INFO_SIGNAL
         
     | 
| 
      
 153 
     | 
    
         
            +
                      end
         
     | 
| 
      
 154 
     | 
    
         
            +
                      result
         
     | 
| 
       107 
155 
     | 
    
         
             
                    end
         
     | 
| 
       108 
     | 
    
         
            -
                    result.add_run
         
     | 
| 
       109 
     | 
    
         
            -
                    yield(FINISHED, name)
         
     | 
| 
       110 
156 
     | 
    
         
             
                  end
         
     | 
| 
       111 
157 
     | 
    
         | 
| 
       112 
158 
     | 
    
         
             
                  private
         
     | 
| 
         @@ -114,31 +160,42 @@ module Test #:nodoc:# 
     | 
|
| 
       114 
160 
     | 
    
         
             
                  # Run through the after_teardown actions, treating failures and errors
         
     | 
| 
       115 
161 
     | 
    
         
             
                  # in the same way that "run" does: they are reported, and the remaining
         
     | 
| 
       116 
162 
     | 
    
         
             
                  # actions are executed.
         
     | 
| 
       117 
     | 
    
         
            -
                   
     | 
| 
       118 
     | 
    
         
            -
                     
     | 
| 
       119 
     | 
    
         
            -
                       
     | 
| 
       120 
     | 
    
         
            -
                         
     | 
| 
       121 
     | 
    
         
            -
             
     | 
| 
       122 
     | 
    
         
            -
                         
     | 
| 
       123 
     | 
    
         
            -
             
     | 
| 
       124 
     | 
    
         
            -
                         
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
      
 163 
     | 
    
         
            +
                  if RUBY_VERSION =~ /^1\.8/
         
     | 
| 
      
 164 
     | 
    
         
            +
                    def execute_post_teardown_actions(test_instance)
         
     | 
| 
      
 165 
     | 
    
         
            +
                      self.class.post_teardown_actions.each do |action|
         
     | 
| 
      
 166 
     | 
    
         
            +
                        begin
         
     | 
| 
      
 167 
     | 
    
         
            +
                          action.call test_instance
         
     | 
| 
      
 168 
     | 
    
         
            +
                        rescue Test::Unit::AssertionFailedError => e
         
     | 
| 
      
 169 
     | 
    
         
            +
                          add_failure(e.message, auxiliary_backtrace_filter(e.backtrace))
         
     | 
| 
      
 170 
     | 
    
         
            +
                        rescue Exception
         
     | 
| 
      
 171 
     | 
    
         
            +
                          raise if should_passthru_exception($!)
         
     | 
| 
      
 172 
     | 
    
         
            +
                          add_error($!)
         
     | 
| 
      
 173 
     | 
    
         
            +
                        end
         
     | 
| 
      
 174 
     | 
    
         
            +
                      end
         
     | 
| 
      
 175 
     | 
    
         
            +
                    end
         
     | 
| 
      
 176 
     | 
    
         
            +
                  end
         
     | 
| 
      
 177 
     | 
    
         
            +
             
     | 
| 
      
 178 
     | 
    
         
            +
                  if RUBY_VERSION =~ /^1\.9/
         
     | 
| 
      
 179 
     | 
    
         
            +
                    def execute_post_teardown_actions(test_instance, runner)
         
     | 
| 
      
 180 
     | 
    
         
            +
                      result = nil
         
     | 
| 
      
 181 
     | 
    
         
            +
                      self.class.post_teardown_actions.each do |action|
         
     | 
| 
      
 182 
     | 
    
         
            +
                        begin
         
     | 
| 
      
 183 
     | 
    
         
            +
                          action.call test_instance
         
     | 
| 
      
 184 
     | 
    
         
            +
                        rescue *PASSTHROUGH_EXCEPTIONS
         
     | 
| 
      
 185 
     | 
    
         
            +
                          raise
         
     | 
| 
      
 186 
     | 
    
         
            +
                        rescue Exception => e
         
     | 
| 
      
 187 
     | 
    
         
            +
                          result = runner.puke(self.class, self.__name__, e)
         
     | 
| 
      
 188 
     | 
    
         
            +
                        end
         
     | 
| 
       126 
189 
     | 
    
         
             
                      end
         
     | 
| 
      
 190 
     | 
    
         
            +
                      result
         
     | 
| 
       127 
191 
     | 
    
         
             
                    end
         
     | 
| 
       128 
192 
     | 
    
         
             
                  end
         
     | 
| 
       129 
193 
     | 
    
         | 
| 
       130 
194 
     | 
    
         
             
                  # Run through the before_setup actions.
         
     | 
| 
       131 
195 
     | 
    
         
             
                  # Failures or errors cause execution to stop.
         
     | 
| 
       132 
     | 
    
         
            -
                  def execute_pre_setup_actions(test_instance)
         
     | 
| 
      
 196 
     | 
    
         
            +
                  def execute_pre_setup_actions(test_instance,runner=nil)
         
     | 
| 
       133 
197 
     | 
    
         
             
                    self.class.pre_setup_actions.each do |action|
         
     | 
| 
       134 
     | 
    
         
            -
             
     | 
| 
       135 
     | 
    
         
            -
                        action.call test_instance
         
     | 
| 
       136 
     | 
    
         
            -
            #          rescue Test::Unit::AssertionFailedError => e
         
     | 
| 
       137 
     | 
    
         
            -
            #            add_failure(e.message, auxiliary_backtrace_filter(e.backtrace))
         
     | 
| 
       138 
     | 
    
         
            -
            #          rescue Exception
         
     | 
| 
       139 
     | 
    
         
            -
            #            raise if should_passthru_exception($!)
         
     | 
| 
       140 
     | 
    
         
            -
            #            add_error($!)
         
     | 
| 
       141 
     | 
    
         
            -
            #          end
         
     | 
| 
      
 198 
     | 
    
         
            +
                      action.call test_instance
         
     | 
| 
       142 
199 
     | 
    
         
             
                    end
         
     | 
| 
       143 
200 
     | 
    
         
             
                  end
         
     | 
| 
       144 
201 
     | 
    
         | 
    
        data/rake_tasks/rdoc.rake
    CHANGED
    
    | 
         @@ -8,7 +8,7 @@ namespace :doc do 
     | 
|
| 
       8 
8 
     | 
    
         
             
                rdoc.rdoc_dir = 'doc'
         
     | 
| 
       9 
9 
     | 
    
         
             
                rdoc.title    = "Hardmock: Strict expectation-based mock object library " 
         
     | 
| 
       10 
10 
     | 
    
         
             
                add_rdoc_options(rdoc.options)
         
     | 
| 
       11 
     | 
    
         
            -
                rdoc.rdoc_files.include('lib/**/*.rb', 'README','CHANGES','LICENSE')
         
     | 
| 
      
 11 
     | 
    
         
            +
                rdoc.rdoc_files.include('lib/**/*.rb', 'README.rdoc','CHANGES','LICENSE')
         
     | 
| 
       12 
12 
     | 
    
         
             
              }
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
       14 
14 
     | 
    
         
             
              task :show => [ 'doc:rerdoc' ] do
         
     | 
    
        data/rake_tasks/rdoc_options.rb
    CHANGED
    
    
| 
         @@ -2,6 +2,12 @@ require File.expand_path(File.dirname(__FILE__) + "/../test_helper") 
     | 
|
| 
       2 
2 
     | 
    
         
             
            require 'assert_error'
         
     | 
| 
       3 
3 
     | 
    
         | 
| 
       4 
4 
     | 
    
         
             
            class AssertErrorTest < Test::Unit::TestCase
         
     | 
| 
      
 5 
     | 
    
         
            +
              TEST_FAILURE = nil
         
     | 
| 
      
 6 
     | 
    
         
            +
              if RUBY_VERSION =~ /^1\.8/
         
     | 
| 
      
 7 
     | 
    
         
            +
                TEST_FAILURE = Test::Unit::AssertionFailedError
         
     | 
| 
      
 8 
     | 
    
         
            +
              elsif RUBY_VERSION =~ /^1\.9/
         
     | 
| 
      
 9 
     | 
    
         
            +
                TEST_FAILURE = MiniTest::Assertion
         
     | 
| 
      
 10 
     | 
    
         
            +
              end
         
     | 
| 
       5 
11 
     | 
    
         | 
| 
       6 
12 
     | 
    
         
             
              it "specfies an error type and message that should be raised" do
         
     | 
| 
       7 
13 
     | 
    
         
             
                assert_error RuntimeError, "Too funky" do
         
     | 
| 
         @@ -10,7 +16,7 @@ class AssertErrorTest < Test::Unit::TestCase 
     | 
|
| 
       10 
16 
     | 
    
         
             
              end
         
     | 
| 
       11 
17 
     | 
    
         | 
| 
       12 
18 
     | 
    
         
             
              it "flunks if the error message is wrong" do
         
     | 
| 
       13 
     | 
    
         
            -
                err = assert_raise  
     | 
| 
      
 19 
     | 
    
         
            +
                err = assert_raise TEST_FAILURE do
         
     | 
| 
       14 
20 
     | 
    
         
             
                  assert_error RuntimeError, "not good" do
         
     | 
| 
       15 
21 
     | 
    
         
             
                    raise RuntimeError.new("Too funky")
         
     | 
| 
       16 
22 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -20,7 +26,7 @@ class AssertErrorTest < Test::Unit::TestCase 
     | 
|
| 
       20 
26 
     | 
    
         
             
              end
         
     | 
| 
       21 
27 
     | 
    
         | 
| 
       22 
28 
     | 
    
         
             
              it "flunks if the error type is wrong" do
         
     | 
| 
       23 
     | 
    
         
            -
                err = assert_raise  
     | 
| 
      
 29 
     | 
    
         
            +
                err = assert_raise TEST_FAILURE do
         
     | 
| 
       24 
30 
     | 
    
         
             
                  assert_error StandardError, "Too funky" do
         
     | 
| 
       25 
31 
     | 
    
         
             
                    raise RuntimeError.new("Too funky")
         
     | 
| 
       26 
32 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -36,7 +42,8 @@ class AssertErrorTest < Test::Unit::TestCase 
     | 
|
| 
       36 
42 
     | 
    
         
             
              end
         
     | 
| 
       37 
43 
     | 
    
         | 
| 
       38 
44 
     | 
    
         
             
              it "flunks if the error message doesn't match all the Regexps" do
         
     | 
| 
       39 
     | 
    
         
            -
                err = assert_raise Test::Unit::AssertionFailedError do
         
     | 
| 
      
 45 
     | 
    
         
            +
                #err = assert_raise Test::Unit::AssertionFailedError do
         
     | 
| 
      
 46 
     | 
    
         
            +
                err = assert_raise TEST_FAILURE do
         
     | 
| 
       40 
47 
     | 
    
         
             
                  assert_error StandardError, /way/i, /too/i, /funky/i do
         
     | 
| 
       41 
48 
     | 
    
         
             
                    raise StandardError.new("Too funky")
         
     | 
| 
       42 
49 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -251,8 +251,12 @@ class ExpectationTest < Test::Unit::TestCase 
     | 
|
| 
       251 
251 
     | 
    
         
             
                err = assert_raise ExpectationError do
         
     | 
| 
       252 
252 
     | 
    
         
             
                  se.apply_method_call(@mock,'each_bean',[:side_slot],a_block)
         
     | 
| 
       253 
253 
     | 
    
         
             
                end
         
     | 
| 
      
 254 
     | 
    
         
            +
                
         
     | 
| 
      
 255 
     | 
    
         
            +
                expected_arity = "-1"
         
     | 
| 
      
 256 
     | 
    
         
            +
                expected_arity = "0" if RUBY_VERSION =~ /^1\.9/
         
     | 
| 
      
 257 
     | 
    
         
            +
             
     | 
| 
       254 
258 
     | 
    
         
             
                assert_match(/wont_fit/i, err.message) 
         
     | 
| 
       255 
     | 
    
         
            -
                assert_match(/arity  
     | 
| 
      
 259 
     | 
    
         
            +
                assert_match(/arity #{expected_arity}/i, err.message) 
         
     | 
| 
       256 
260 
     | 
    
         
             
                assert_equal [], things, "Wrong things"
         
     | 
| 
       257 
261 
     | 
    
         
             
              end
         
     | 
| 
       258 
262 
     | 
    
         | 
| 
         @@ -11,12 +11,14 @@ class MethodCleanoutTest < Test::Unit::TestCase 
     | 
|
| 
       11 
11 
     | 
    
         
             
                @victim = Victim.new
         
     | 
| 
       12 
12 
     | 
    
         
             
              end
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
       14 
     | 
    
         
            -
               
     | 
| 
       15 
     | 
    
         
            -
                 
     | 
| 
       16 
     | 
    
         
            -
                   
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
                   
     | 
| 
      
 14 
     | 
    
         
            +
              if RUBY_VERSION =~ /^1\.8/
         
     | 
| 
      
 15 
     | 
    
         
            +
                def test_should_remove_most_methods_from_a_class
         
     | 
| 
      
 16 
     | 
    
         
            +
                  expect_removed = Victim::OriginalMethods.reject { |m| 
         
     | 
| 
      
 17 
     | 
    
         
            +
                    Hardmock::MethodCleanout::SACRED_METHODS.include?(m)
         
     | 
| 
      
 18 
     | 
    
         
            +
                  }
         
     | 
| 
      
 19 
     | 
    
         
            +
                  expect_removed.each do |m|
         
     | 
| 
      
 20 
     | 
    
         
            +
                    assert !@victim.respond_to?(m), "should not have method #{m}"
         
     | 
| 
      
 21 
     | 
    
         
            +
                  end
         
     | 
| 
       20 
22 
     | 
    
         
             
                end
         
     | 
| 
       21 
23 
     | 
    
         
             
              end
         
     | 
| 
       22 
24 
     | 
    
         | 
| 
         @@ -6,6 +6,8 @@ class TestUnitBeforeAfter < Test::Unit::TestCase 
     | 
|
| 
       6 
6 
     | 
    
         
             
              # after_teardown
         
     | 
| 
       7 
7 
     | 
    
         
             
              #
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
      
 9 
     | 
    
         
            +
              USING_RUBY_1_9 = RUBY_VERSION =~ /^1\.9/
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
       9 
11 
     | 
    
         
             
              it "adds TestCase.after_teardown hook for appending post-teardown actions" do
         
     | 
| 
       10 
12 
     | 
    
         
             
                write_and_run_test :use_after_teardown => true
         
     | 
| 
       11 
13 
     | 
    
         | 
| 
         @@ -21,16 +23,28 @@ class TestUnitBeforeAfter < Test::Unit::TestCase 
     | 
|
| 
       21 
23 
     | 
    
         | 
| 
       22 
24 
     | 
    
         
             
              should "execute all after_teardowns, even if the main teardown flunks" do
         
     | 
| 
       23 
25 
     | 
    
         
             
                write_and_run_test :use_after_teardown => true, :flunk_in_teardown => true
         
     | 
| 
       24 
     | 
    
         
            -
                 
     | 
| 
       25 
     | 
    
         
            -
                  " 
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
      
 26 
     | 
    
         
            +
                if USING_RUBY_1_9
         
     | 
| 
      
 27 
     | 
    
         
            +
                  see_in_order "Loaded suite",
         
     | 
| 
      
 28 
     | 
    
         
            +
                    "THE SETUP",
         
     | 
| 
      
 29 
     | 
    
         
            +
                    "A TEST",
         
     | 
| 
      
 30 
     | 
    
         
            +
                    "1st after_teardown",
         
     | 
| 
      
 31 
     | 
    
         
            +
                    "2nd after_teardown",
         
     | 
| 
      
 32 
     | 
    
         
            +
                    "Finished in",
         
     | 
| 
      
 33 
     | 
    
         
            +
                    "1) Failure:",
         
     | 
| 
      
 34 
     | 
    
         
            +
                    "test_something(MyExampleTest) [_test_file_temp.rb:20]:",
         
     | 
| 
      
 35 
     | 
    
         
            +
                    "FLUNK IN TEARDOWN"
         
     | 
| 
      
 36 
     | 
    
         
            +
                else
         
     | 
| 
      
 37 
     | 
    
         
            +
                  see_in_order "Loaded suite",
         
     | 
| 
      
 38 
     | 
    
         
            +
                    "THE SETUP",
         
     | 
| 
      
 39 
     | 
    
         
            +
                    "A TEST",
         
     | 
| 
      
 40 
     | 
    
         
            +
                    "F",
         
     | 
| 
      
 41 
     | 
    
         
            +
                    "1st after_teardown",
         
     | 
| 
      
 42 
     | 
    
         
            +
                    "2nd after_teardown",
         
     | 
| 
      
 43 
     | 
    
         
            +
                    "Finished in",
         
     | 
| 
      
 44 
     | 
    
         
            +
                    "1) Failure:",
         
     | 
| 
      
 45 
     | 
    
         
            +
                    "test_something(MyExampleTest) [_test_file_temp.rb:20]:",
         
     | 
| 
      
 46 
     | 
    
         
            +
                    "FLUNK IN TEARDOWN"
         
     | 
| 
      
 47 
     | 
    
         
            +
                end
         
     | 
| 
       34 
48 
     | 
    
         
             
                see_results :tests => 1, :assertions => 1, :failures => 1, :errors => 0
         
     | 
| 
       35 
49 
     | 
    
         
             
              end
         
     | 
| 
       36 
50 
     | 
    
         | 
| 
         @@ -54,7 +68,6 @@ class TestUnitBeforeAfter < Test::Unit::TestCase 
     | 
|
| 
       54 
68 
     | 
    
         
             
                  "A TEST",
         
     | 
| 
       55 
69 
     | 
    
         
             
                  "THE TEARDOWN",
         
     | 
| 
       56 
70 
     | 
    
         
             
                  "1st after_teardown",
         
     | 
| 
       57 
     | 
    
         
            -
                  "F",
         
     | 
| 
       58 
71 
     | 
    
         
             
                  "2nd after_teardown",
         
     | 
| 
       59 
72 
     | 
    
         
             
                  "Finished in",
         
     | 
| 
       60 
73 
     | 
    
         
             
                  "1) Failure:",
         
     | 
| 
         @@ -68,16 +81,28 @@ class TestUnitBeforeAfter < Test::Unit::TestCase 
     | 
|
| 
       68 
81 
     | 
    
         | 
| 
       69 
82 
     | 
    
         
             
              should "execute all after_teardowns, even if some of them explode" do
         
     | 
| 
       70 
83 
     | 
    
         
             
                write_and_run_test :use_after_teardown => true, :raise_in_after_teardown => true
         
     | 
| 
       71 
     | 
    
         
            -
                 
     | 
| 
       72 
     | 
    
         
            -
                  " 
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
       74 
     | 
    
         
            -
             
     | 
| 
       75 
     | 
    
         
            -
             
     | 
| 
       76 
     | 
    
         
            -
             
     | 
| 
       77 
     | 
    
         
            -
             
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
     | 
    
         
            -
             
     | 
| 
       80 
     | 
    
         
            -
             
     | 
| 
      
 84 
     | 
    
         
            +
                if USING_RUBY_1_9
         
     | 
| 
      
 85 
     | 
    
         
            +
                  see_in_order "Loaded suite",
         
     | 
| 
      
 86 
     | 
    
         
            +
                    "THE SETUP",
         
     | 
| 
      
 87 
     | 
    
         
            +
                    "A TEST",
         
     | 
| 
      
 88 
     | 
    
         
            +
                    "THE TEARDOWN",
         
     | 
| 
      
 89 
     | 
    
         
            +
                    "1st after_teardown",
         
     | 
| 
      
 90 
     | 
    
         
            +
                    "2nd after_teardown",
         
     | 
| 
      
 91 
     | 
    
         
            +
                    "Finished in",
         
     | 
| 
      
 92 
     | 
    
         
            +
                    "RuntimeError: Error in first after_teardown",
         
     | 
| 
      
 93 
     | 
    
         
            +
                    "RuntimeError: Error in second after_teardown"
         
     | 
| 
      
 94 
     | 
    
         
            +
                else
         
     | 
| 
      
 95 
     | 
    
         
            +
                  see_in_order "Loaded suite",
         
     | 
| 
      
 96 
     | 
    
         
            +
                    "THE SETUP",
         
     | 
| 
      
 97 
     | 
    
         
            +
                    "A TEST",
         
     | 
| 
      
 98 
     | 
    
         
            +
                    "THE TEARDOWN",
         
     | 
| 
      
 99 
     | 
    
         
            +
                    "1st after_teardown",
         
     | 
| 
      
 100 
     | 
    
         
            +
                    "E",
         
     | 
| 
      
 101 
     | 
    
         
            +
                    "2nd after_teardown",
         
     | 
| 
      
 102 
     | 
    
         
            +
                    "Finished in",
         
     | 
| 
      
 103 
     | 
    
         
            +
                    "RuntimeError: Error in first after_teardown",
         
     | 
| 
      
 104 
     | 
    
         
            +
                    "RuntimeError: Error in second after_teardown"
         
     | 
| 
      
 105 
     | 
    
         
            +
                end
         
     | 
| 
       81 
106 
     | 
    
         
             
                see_results :tests => 1, :assertions => 0, :failures => 0, :errors => 2
         
     | 
| 
       82 
107 
     | 
    
         
             
              end
         
     | 
| 
       83 
108 
     | 
    
         | 
| 
         @@ -104,32 +129,56 @@ class TestUnitBeforeAfter < Test::Unit::TestCase 
     | 
|
| 
       104 
129 
     | 
    
         | 
| 
       105 
130 
     | 
    
         
             
              it "provides a cleaned-up backtrace" do
         
     | 
| 
       106 
131 
     | 
    
         
             
                write_and_run_test :with_failure => true
         
     | 
| 
       107 
     | 
    
         
            -
                 
     | 
| 
       108 
     | 
    
         
            -
                  " 
     | 
| 
       109 
     | 
    
         
            -
             
     | 
| 
       110 
     | 
    
         
            -
             
     | 
| 
       111 
     | 
    
         
            -
             
     | 
| 
       112 
     | 
    
         
            -
             
     | 
| 
       113 
     | 
    
         
            -
             
     | 
| 
       114 
     | 
    
         
            -
             
     | 
| 
       115 
     | 
    
         
            -
             
     | 
| 
      
 132 
     | 
    
         
            +
                if USING_RUBY_1_9
         
     | 
| 
      
 133 
     | 
    
         
            +
                  see_in_order "Loaded suite",
         
     | 
| 
      
 134 
     | 
    
         
            +
                    "THE SETUP",
         
     | 
| 
      
 135 
     | 
    
         
            +
                    "A FAILING TEST",
         
     | 
| 
      
 136 
     | 
    
         
            +
                    "THE TEARDOWN",
         
     | 
| 
      
 137 
     | 
    
         
            +
                    "F\n", 
         
     | 
| 
      
 138 
     | 
    
         
            +
                    "Finished in",
         
     | 
| 
      
 139 
     | 
    
         
            +
                    "1) Failure:",
         
     | 
| 
      
 140 
     | 
    
         
            +
                    "test_something(MyExampleTest) [_test_file_temp.rb:17]:",
         
     | 
| 
      
 141 
     | 
    
         
            +
                    "Instrumented failure"
         
     | 
| 
      
 142 
     | 
    
         
            +
                else
         
     | 
| 
      
 143 
     | 
    
         
            +
                  see_in_order "Loaded suite",
         
     | 
| 
      
 144 
     | 
    
         
            +
                    "THE SETUP",
         
     | 
| 
      
 145 
     | 
    
         
            +
                    "A FAILING TEST",
         
     | 
| 
      
 146 
     | 
    
         
            +
                    "F", 
         
     | 
| 
      
 147 
     | 
    
         
            +
                    "THE TEARDOWN",
         
     | 
| 
      
 148 
     | 
    
         
            +
                    "Finished in",
         
     | 
| 
      
 149 
     | 
    
         
            +
                    "1) Failure:",
         
     | 
| 
      
 150 
     | 
    
         
            +
                    "test_something(MyExampleTest) [_test_file_temp.rb:17]:",
         
     | 
| 
      
 151 
     | 
    
         
            +
                    "Instrumented failure.",
         
     | 
| 
      
 152 
     | 
    
         
            +
                    "<false> is not true."
         
     | 
| 
      
 153 
     | 
    
         
            +
                end
         
     | 
| 
       116 
154 
     | 
    
         
             
                see_results :tests => 1, :assertions => 1, :failures => 1, :errors => 0
         
     | 
| 
       117 
155 
     | 
    
         
             
              end
         
     | 
| 
       118 
156 
     | 
    
         | 
| 
       119 
157 
     | 
    
         
             
              it "provides a cleaned-up backtrace, but not TOO cleaned up" do
         
     | 
| 
       120 
158 
     | 
    
         
             
                write_and_run_test :with_failure => true, :use_helpers => true
         
     | 
| 
       121 
     | 
    
         
            -
                 
     | 
| 
       122 
     | 
    
         
            -
                  " 
     | 
| 
       123 
     | 
    
         
            -
             
     | 
| 
       124 
     | 
    
         
            -
             
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
       126 
     | 
    
         
            -
             
     | 
| 
       127 
     | 
    
         
            -
             
     | 
| 
       128 
     | 
    
         
            -
             
     | 
| 
       129 
     | 
    
         
            -
             
     | 
| 
       130 
     | 
    
         
            -
             
     | 
| 
       131 
     | 
    
         
            -
                  " 
     | 
| 
       132 
     | 
    
         
            -
             
     | 
| 
      
 159 
     | 
    
         
            +
                if USING_RUBY_1_9
         
     | 
| 
      
 160 
     | 
    
         
            +
                  see_in_order "Loaded suite",
         
     | 
| 
      
 161 
     | 
    
         
            +
                    "THE SETUP",
         
     | 
| 
      
 162 
     | 
    
         
            +
                    "A FAILING TEST",
         
     | 
| 
      
 163 
     | 
    
         
            +
                    "F", "THE TEARDOWN",
         
     | 
| 
      
 164 
     | 
    
         
            +
                    "Finished in",
         
     | 
| 
      
 165 
     | 
    
         
            +
                    "1) Failure:",
         
     | 
| 
      
 166 
     | 
    
         
            +
                    "test_something(MyExampleTest)",
         
     | 
| 
      
 167 
     | 
    
         
            +
                    "Instrumented failure"
         
     | 
| 
      
 168 
     | 
    
         
            +
                else
         
     | 
| 
      
 169 
     | 
    
         
            +
                  see_in_order "Loaded suite",
         
     | 
| 
      
 170 
     | 
    
         
            +
                    "THE SETUP",
         
     | 
| 
      
 171 
     | 
    
         
            +
                    "A FAILING TEST",
         
     | 
| 
      
 172 
     | 
    
         
            +
                    "F", "THE TEARDOWN",
         
     | 
| 
      
 173 
     | 
    
         
            +
                    "Finished in",
         
     | 
| 
      
 174 
     | 
    
         
            +
                    "1) Failure:",
         
     | 
| 
      
 175 
     | 
    
         
            +
                    "test_something(MyExampleTest)\n",
         
     | 
| 
      
 176 
     | 
    
         
            +
                    "[_test_file_temp.rb:25:in `tripwire'",
         
     | 
| 
      
 177 
     | 
    
         
            +
                    "_test_file_temp.rb:21:in `my_helper'",
         
     | 
| 
      
 178 
     | 
    
         
            +
                    "_test_file_temp.rb:17:in `test_something']:",
         
     | 
| 
      
 179 
     | 
    
         
            +
                    "Instrumented failure.",
         
     | 
| 
      
 180 
     | 
    
         
            +
                    "<false> is not true."
         
     | 
| 
      
 181 
     | 
    
         
            +
                end
         
     | 
| 
       133 
182 
     | 
    
         
             
                see_results :tests => 1, :assertions => 1, :failures => 1, :errors => 0
         
     | 
| 
       134 
183 
     | 
    
         
             
              end
         
     | 
| 
       135 
184 
     | 
    
         | 
| 
         @@ -165,10 +214,10 @@ class TestUnitBeforeAfter < Test::Unit::TestCase 
     | 
|
| 
       165 
214 
     | 
    
         
             
                see_in_order "Loaded suite",
         
     | 
| 
       166 
215 
     | 
    
         
             
                  "3rd before_setup",
         
     | 
| 
       167 
216 
     | 
    
         
             
                  "2nd before_setup",
         
     | 
| 
       168 
     | 
    
         
            -
                  " 
     | 
| 
      
 217 
     | 
    
         
            +
                  "THE TEARDOWN",
         
     | 
| 
       169 
218 
     | 
    
         
             
                  "1) Failure:",
         
     | 
| 
       170 
219 
     | 
    
         
             
                  "test_something(MyExampleTest) [_test_file_temp.rb:10]:",
         
     | 
| 
       171 
     | 
    
         
            -
                  "Flunk in 2nd before_setup 
     | 
| 
      
 220 
     | 
    
         
            +
                  "Flunk in 2nd before_setup"
         
     | 
| 
       172 
221 
     | 
    
         
             
                see_results :tests => 1, :assertions => 1, :failures => 1, :errors => 0
         
     | 
| 
       173 
222 
     | 
    
         
             
              end
         
     | 
| 
       174 
223 
     | 
    
         | 
| 
         @@ -177,7 +226,7 @@ class TestUnitBeforeAfter < Test::Unit::TestCase 
     | 
|
| 
       177 
226 
     | 
    
         
             
                see_in_order "Loaded suite",
         
     | 
| 
       178 
227 
     | 
    
         
             
                  "3rd before_setup",
         
     | 
| 
       179 
228 
     | 
    
         
             
                  "2nd before_setup",
         
     | 
| 
       180 
     | 
    
         
            -
                  " 
     | 
| 
      
 229 
     | 
    
         
            +
                  "THE TEARDOWN",
         
     | 
| 
       181 
230 
     | 
    
         
             
                  "Finished in",
         
     | 
| 
       182 
231 
     | 
    
         
             
                  "test_something(MyExampleTest):",
         
     | 
| 
       183 
232 
     | 
    
         
             
                  "RuntimeError: Error in 2nd before_setup",
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,12 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: hardmock
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
               
     | 
| 
      
 4 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 5 
     | 
    
         
            +
              segments: 
         
     | 
| 
      
 6 
     | 
    
         
            +
              - 1
         
     | 
| 
      
 7 
     | 
    
         
            +
              - 3
         
     | 
| 
      
 8 
     | 
    
         
            +
              - 8
         
     | 
| 
      
 9 
     | 
    
         
            +
              version: 1.3.8
         
     | 
| 
       5 
10 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
11 
     | 
    
         
             
            authors: 
         
     | 
| 
       7 
12 
     | 
    
         
             
            - David Crosby
         
     | 
| 
         @@ -9,7 +14,7 @@ autorequire: hardmock 
     | 
|
| 
       9 
14 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
15 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
16 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
            date:  
     | 
| 
      
 17 
     | 
    
         
            +
            date: 2011-01-05 00:00:00 -05:00
         
     | 
| 
       13 
18 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       14 
19 
     | 
    
         
             
            dependencies: []
         
     | 
| 
       15 
20 
     | 
    
         | 
| 
         @@ -20,7 +25,7 @@ executables: [] 
     | 
|
| 
       20 
25 
     | 
    
         
             
            extensions: []
         
     | 
| 
       21 
26 
     | 
    
         | 
| 
       22 
27 
     | 
    
         
             
            extra_rdoc_files: 
         
     | 
| 
       23 
     | 
    
         
            -
            - README
         
     | 
| 
      
 28 
     | 
    
         
            +
            - README.rdoc
         
     | 
| 
       24 
29 
     | 
    
         
             
            - CHANGES
         
     | 
| 
       25 
30 
     | 
    
         
             
            - LICENSE
         
     | 
| 
       26 
31 
     | 
    
         
             
            files: 
         
     | 
| 
         @@ -58,7 +63,7 @@ files: 
     | 
|
| 
       58 
63 
     | 
    
         
             
            - rake_tasks/rdoc_options.rb
         
     | 
| 
       59 
64 
     | 
    
         
             
            - rake_tasks/rdoc.rake
         
     | 
| 
       60 
65 
     | 
    
         
             
            - rake_tasks/test.rake
         
     | 
| 
       61 
     | 
    
         
            -
            - README
         
     | 
| 
      
 66 
     | 
    
         
            +
            - README.rdoc
         
     | 
| 
       62 
67 
     | 
    
         
             
            - CHANGES
         
     | 
| 
       63 
68 
     | 
    
         
             
            - LICENSE
         
     | 
| 
       64 
69 
     | 
    
         
             
            has_rdoc: true
         
     | 
| 
         @@ -70,30 +75,34 @@ rdoc_options: 
     | 
|
| 
       70 
75 
     | 
    
         
             
            - --line-numbers
         
     | 
| 
       71 
76 
     | 
    
         
             
            - --inline-source
         
     | 
| 
       72 
77 
     | 
    
         
             
            - --main
         
     | 
| 
       73 
     | 
    
         
            -
            - README
         
     | 
| 
      
 78 
     | 
    
         
            +
            - README.rdoc
         
     | 
| 
       74 
79 
     | 
    
         
             
            - --title
         
     | 
| 
       75 
80 
     | 
    
         
             
            - Hardmock
         
     | 
| 
       76 
81 
     | 
    
         
             
            require_paths: 
         
     | 
| 
       77 
82 
     | 
    
         
             
            - lib
         
     | 
| 
       78 
83 
     | 
    
         
             
            required_ruby_version: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 84 
     | 
    
         
            +
              none: false
         
     | 
| 
       79 
85 
     | 
    
         
             
              requirements: 
         
     | 
| 
       80 
86 
     | 
    
         
             
              - - ">="
         
     | 
| 
       81 
87 
     | 
    
         
             
                - !ruby/object:Gem::Version 
         
     | 
| 
      
 88 
     | 
    
         
            +
                  segments: 
         
     | 
| 
      
 89 
     | 
    
         
            +
                  - 0
         
     | 
| 
       82 
90 
     | 
    
         
             
                  version: "0"
         
     | 
| 
       83 
     | 
    
         
            -
              version: 
         
     | 
| 
       84 
91 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 92 
     | 
    
         
            +
              none: false
         
     | 
| 
       85 
93 
     | 
    
         
             
              requirements: 
         
     | 
| 
       86 
94 
     | 
    
         
             
              - - ">="
         
     | 
| 
       87 
95 
     | 
    
         
             
                - !ruby/object:Gem::Version 
         
     | 
| 
      
 96 
     | 
    
         
            +
                  segments: 
         
     | 
| 
      
 97 
     | 
    
         
            +
                  - 0
         
     | 
| 
       88 
98 
     | 
    
         
             
                  version: "0"
         
     | 
| 
       89 
     | 
    
         
            -
              version: 
         
     | 
| 
       90 
99 
     | 
    
         
             
            requirements: []
         
     | 
| 
       91 
100 
     | 
    
         | 
| 
       92 
101 
     | 
    
         
             
            rubyforge_project: hardmock
         
     | 
| 
       93 
     | 
    
         
            -
            rubygems_version: 1.3. 
     | 
| 
      
 102 
     | 
    
         
            +
            rubygems_version: 1.3.7
         
     | 
| 
       94 
103 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       95 
104 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       96 
     | 
    
         
            -
            summary: A strict, ordered, expectation-oriented mock object library.
         
     | 
| 
      
 105 
     | 
    
         
            +
            summary: A strict, ordered, expectation-oriented mock object library. DISCONTINUED AS OF JAN 2011, see Readme
         
     | 
| 
       97 
106 
     | 
    
         
             
            test_files: 
         
     | 
| 
       98 
107 
     | 
    
         
             
            - test/functional/assert_error_test.rb
         
     | 
| 
       99 
108 
     | 
    
         
             
            - test/functional/auto_verify_test.rb
         
     |