Permalink
Browse files

Hardmock 1.3.3

 
* stubs! and expects! no longer require that their target methods exist in reality (this used to prevent you from stubbing methods that "exist" by virtue of "method_missing"
* Tweaked inner metaclass code to avoid collisions with rspec's "metaid" stuff
* Moved this project's Rake tasks into rake_tasks... otherwise Rails will load them, if Hardmock is installed as a Rails plugin
* Alias added: 'verify_hardmocks' is now an alias for 'verify_mocks'  (some internal projects were using this modified method name as a means of cooexisting with mocha)



git-svn-id: http://hardmock.rubyforge.org/svn/trunk@75 48d1a0da-1ed6-4f58-8415-457aad5d95da
  • Loading branch information...
1 parent d513188 commit 88e26ff52b47a8e4fa0e90331f4231edd788d8c3 dcrosby42 committed Dec 6, 2007
Showing with 50 additions and 2 deletions.
  1. +28 −0 CHANGES
  2. +19 −0 README
  3. +1 −1 Rakefile
  4. +2 −1 test/unit/method_cleanout_test.rb
View
28 CHANGES
@@ -1,3 +1,31 @@
+Hardmock 1.3.3
+
+* stubs! and expects! no longer require that their target methods exist in reality (this used to prevent you from stubbing methods that "exist" by virtue of "method_missing"
+* Tweaked inner metaclass code to avoid collisions with rspec's "metaid" stuff
+* Moved this project's Rake tasks into rake_tasks... otherwise Rails will load them, if Hardmock is installed as a Rails plugin
+* Alias added: 'verify_hardmocks' is now an alias for 'verify_mocks' (some internal projects were using this modified method name as a means of cooexisting with mocha)
+
+Hardmock 1.3.2
+
+November 2007
+
+* adds 'with' as an alternate syntax for specifying argument expectations.
+
+Hardmock 1.3.1
+
+October 2007
+
+* Can use stubs! on a mock object
+* expects! now generates mocked methods that can safely transfer runtime blocks to the mock instance itself
+* No longer need to call "prepare_hardmock_control" when using stubs in the absence of mocks
+* Stubs of concrete class or instance methods are restored to original state in teardown
+
+Hardmock 1.3.0
+
+October 2007
+
+* Adds stubs! and expects! method to all objects and classes to support concrete stubbing/mocking.
+
Hardmock 1.2.3
Sat Apr 28 01:16:15 EDT 2007
View
19 README
@@ -46,6 +46,25 @@ Expects <tt>@garage.open_door</tt>, <tt>@car.start(:choke)</tt> and <tt>@car.dri
* SVN access: svn co svn://rubyforge.org/var/svn/hardmock/trunk
* Developer SVN access: svn co svn://developername@rubyforge.org/var/svn/hardmock/trunk
+== Setup for Test::Unit
+
+ require 'hardmock'
+ require 'assert_error' # OPTIONAL: this adds the TestUnit extension 'assert_error'
+
+NOTE: If installed as a Rails plugin, init.rb does this for you... nothing else is needed.
+
+== Setup for RSpec
+
+Get this into your spec helper or environment or Rakefile or wherever you prefer:
+
+ Spec::Runner.configure do |configuration|
+ configuration.include Hardmock
+ configuration.after(:each) {verify_mocks}
+ end
+
+This puts the implicit conveniences into your spec context, like "create_mocks" etc, and also provides for automatic
+"verify_mocks" after each Example is run.
+
== Author
* David Crosby crosby at http://atomicobject.com
* (c) 2006,2007 Atomic Object LLC
View
@@ -1,7 +1,7 @@
require 'rake'
require 'rubygems'
-HARDMOCK_VERSION = "1.3.2"
+HARDMOCK_VERSION = "1.3.3"
Dir["rake_tasks/*.rake"].each { |f| load f }
@@ -22,7 +22,8 @@ def test_should_remove_most_methods_from_a_class
def test_should_leave_the_sacred_methods_defined
Hardmock::MethodCleanout::SACRED_METHODS.each do |m|
- assert @victim.respond_to?(m)
+ next if m =~ /^hm_/
+ assert @victim.respond_to?(m), "Sacred method '#{m}' was removed unexpectedly"
end
end

0 comments on commit 88e26ff

Please sign in to comment.