Permalink
Browse files

Fixed Rails plugin which stopped working after 0.9.6. Updated documen…

…tation to reflect this fix. Updated release notes and bumped version in preparation for release 0.9.8.
  • Loading branch information...
1 parent 52735d0 commit 645024765b2d92018efc511652e1174163844e39 @floehopper floehopper committed Sep 18, 2009
Showing with 21 additions and 12 deletions.
  1. +3 −1 README
  2. +7 −0 RELEASE
  3. +1 −1 Rakefile
  4. +3 −3 init.rb
  5. +7 −7 mocha.gemspec
View
4 README
@@ -13,11 +13,13 @@ Mocha was harvested from projects at Reevoo[http://www.reevoo.com] by me (James[
Install the gem with the following command...
$ gem install mocha
-
+
Or install the Rails[http://www.rubyonrails.org] plugin...
$ script/plugin install git://github.com/floehopper/mocha.git
+Note that versions 0.9.6 & 0.9.7 of the Rails plugin were broken. As of version 0.9.8, you need to explicitly load Mocha after the test framework e.g. by adding "require 'mocha'" at the bottom of test/test_helper.rb.
+
Or download Mocha...
http://rubyforge.org/frs/?group_id=1917
View
7 RELEASE
@@ -1,3 +1,10 @@
+= 0.9.8 ()
+* Fixed bug "NameError raised when using Mocha as a Rails plug-in" - http://floehopper.lighthouseapp.com/projects/22289/tickets/53. Since 0.9.6 the Rails plugin has been broken. See bug report for details. You will need to explicitly load Mocha *after* the test framework has been loaded, e.g. by adding "require 'mocha'" at the bottom of test/test_helper.rb.
+* Make Mocha::ParameterMatchers#regexp_matches, #includes, #has_value, #has_key more robust. Thanks to Sander Hartlage.
+* Allow passing a block to Mocha::Configuration methods to only change configuration for the duration of the block. Thanks to Dan Manges.
+* Fixed bug "doc generation fails in 0.9.7 gem" - http://floehopper.lighthouseapp.com/projects/22289/tickets/51.
+* Remove rdoc template incorporating google analytics from source control. The file just needs to exist locally and be ignored by source control. This should stop the warning showing up on e.g. RunCodeRun build results.
+
= 0.9.7 (80d816f250dc13aaf856f3f9cbd97ebe9c371839)
* Although I had provided a deprecation warning for people using Mocha::Standalone, I had assumed people wouldn't be explicitly loading the mocha/standalone.rb file. It turns out this assumption was incorrect at least in the case of Rspec. This is now fixed.
View
2 Rakefile
@@ -3,7 +3,7 @@ require 'rake/gempackagetask'
require 'rake/testtask'
module Mocha
- VERSION = "0.9.7"
+ VERSION = "0.9.8"
end
desc "Run all tests"
View
6 init.rb
@@ -1,3 +1,3 @@
-if ENV['RAILS_ENV'] == 'test' then
- require 'mocha'
-end
+# Mocha should no longer be loaded at plugin load time
+# You should explicitly load Mocha *after* Test::Unit or MiniTest have been loaded
+# e.g. by adding "require 'mocha'" at the bottom of test/test_helper.rb
View
14 mocha.gemspec
@@ -2,26 +2,26 @@
Gem::Specification.new do |s|
s.name = %q{mocha}
- s.version = "0.9.7.20090701124354"
+ s.version = "0.9.8.20090918115329"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["James Mead"]
- s.date = %q{2009-07-01}
- s.description = %q{Mocking and stubbing library with JMock/SchMock syntax, which allows mocking and stubbing of methods on real (non-mock) classes.}
+ s.date = %q{2009-09-18}
+ s.description = %q{ Mocking and stubbing library with JMock/SchMock syntax, which allows mocking and stubbing of methods on real (non-mock) classes.
+}
s.email = %q{mocha-developer@googlegroups.com}
s.extra_rdoc_files = ["README", "COPYING"]
- s.files = ["lib/mocha/any_instance_method.rb", "lib/mocha/api.rb", "lib/mocha/argument_iterator.rb", "lib/mocha/backtrace_filter.rb", "lib/mocha/cardinality.rb", "lib/mocha/central.rb", "lib/mocha/change_state_side_effect.rb", "lib/mocha/class_method.rb", "lib/mocha/configuration.rb", "lib/mocha/deprecation.rb", "lib/mocha/exception_raiser.rb", "lib/mocha/expectation.rb", "lib/mocha/expectation_error.rb", "lib/mocha/expectation_list.rb", "lib/mocha/in_state_ordering_constraint.rb", "lib/mocha/inspect.rb", "lib/mocha/instance_method.rb", "lib/mocha/integration/mini_test/assertion_counter.rb", "lib/mocha/integration/mini_test/version_131_and_above.rb", "lib/mocha/integration/mini_test.rb", "lib/mocha/integration/test_unit/assertion_counter.rb", "lib/mocha/integration/test_unit/gem_version_200.rb", "lib/mocha/integration/test_unit/gem_version_201_and_above.rb", "lib/mocha/integration/test_unit/ruby_version_185_and_below.rb", "lib/mocha/integration/test_unit/ruby_version_186_and_above.rb", "lib/mocha/integration/test_unit.rb", "lib/mocha/integration.rb", "lib/mocha/is_a.rb", "lib/mocha/logger.rb", "lib/mocha/metaclass.rb", "lib/mocha/method_matcher.rb", "lib/mocha/mock.rb", "lib/mocha/mockery.rb", "lib/mocha/module_method.rb", "lib/mocha/multiple_yields.rb", "lib/mocha/names.rb", "lib/mocha/no_yields.rb", "lib/mocha/object.rb", "lib/mocha/parameter_matchers/all_of.rb", "lib/mocha/parameter_matchers/any_of.rb", "lib/mocha/parameter_matchers/any_parameters.rb", "lib/mocha/parameter_matchers/anything.rb", "lib/mocha/parameter_matchers/base.rb", "lib/mocha/parameter_matchers/equals.rb", "lib/mocha/parameter_matchers/has_entries.rb", "lib/mocha/parameter_matchers/has_entry.rb", "lib/mocha/parameter_matchers/has_key.rb", "lib/mocha/parameter_matchers/has_value.rb", "lib/mocha/parameter_matchers/includes.rb", "lib/mocha/parameter_matchers/instance_of.rb", "lib/mocha/parameter_matchers/is_a.rb", "lib/mocha/parameter_matchers/kind_of.rb", "lib/mocha/parameter_matchers/not.rb", "lib/mocha/parameter_matchers/object.rb", "lib/mocha/parameter_matchers/optionally.rb", "lib/mocha/parameter_matchers/regexp_matches.rb", "lib/mocha/parameter_matchers/responds_with.rb", "lib/mocha/parameter_matchers/yaml_equivalent.rb", "lib/mocha/parameter_matchers.rb", "lib/mocha/parameters_matcher.rb", "lib/mocha/pretty_parameters.rb", "lib/mocha/return_values.rb", "lib/mocha/sequence.rb", "lib/mocha/single_return_value.rb", "lib/mocha/single_yield.rb", "lib/mocha/standalone.rb", "lib/mocha/state_machine.rb", "lib/mocha/stubbing_error.rb", "lib/mocha/unexpected_invocation.rb", "lib/mocha/yield_parameters.rb", "lib/mocha.rb", "lib/mocha_standalone.rb", "lib/stubba.rb", "test/acceptance/acceptance_test_helper.rb", "test/acceptance/api_test.rb", "test/acceptance/bug_18914_test.rb", "test/acceptance/bug_21465_test.rb", "test/acceptance/bug_21563_test.rb", "test/acceptance/expected_invocation_count_test.rb", "test/acceptance/failure_messages_test.rb", "test/acceptance/minitest_test.rb", "test/acceptance/mocha_example_test.rb", "test/acceptance/mocha_test_result_test.rb", "test/acceptance/mock_test.rb", "test/acceptance/mock_with_initializer_block_test.rb", "test/acceptance/mocked_methods_dispatch_test.rb", "test/acceptance/optional_parameters_test.rb", "test/acceptance/parameter_matcher_test.rb", "test/acceptance/partial_mocks_test.rb", "test/acceptance/return_value_test.rb", "test/acceptance/sequence_test.rb", "test/acceptance/states_test.rb", "test/acceptance/stub_any_instance_method_test.rb", "test/acceptance/stub_class_method_test.rb", "test/acceptance/stub_everything_test.rb", "test/acceptance/stub_instance_method_test.rb", "test/acceptance/stub_module_method_test.rb", "test/acceptance/stub_test.rb", "test/acceptance/stubba_example_test.rb", "test/acceptance/stubba_test.rb", "test/acceptance/stubba_test_result_test.rb", "test/acceptance/stubbing_error_backtrace_test.rb", "test/acceptance/stubbing_method_unnecessarily_test.rb", "test/acceptance/stubbing_non_existent_any_instance_method_test.rb", "test/acceptance/stubbing_non_existent_class_method_test.rb", "test/acceptance/stubbing_non_existent_instance_method_test.rb", "test/acceptance/stubbing_non_public_any_instance_method_test.rb", "test/acceptance/stubbing_non_public_class_method_test.rb", "test/acceptance/stubbing_non_public_instance_method_test.rb", "test/acceptance/stubbing_on_non_mock_object_test.rb", "test/deprecation_disabler.rb", "test/execution_point.rb", "test/method_definer.rb", "test/simple_counter.rb", "test/test_helper.rb", "test/test_runner.rb", "test/unit/any_instance_method_test.rb", "test/unit/array_inspect_test.rb", "test/unit/backtrace_filter_test.rb", "test/unit/cardinality_test.rb", "test/unit/central_test.rb", "test/unit/change_state_side_effect_test.rb", "test/unit/class_method_test.rb", "test/unit/date_time_inspect_test.rb", "test/unit/exception_raiser_test.rb", "test/unit/expectation_list_test.rb", "test/unit/expectation_test.rb", "test/unit/hash_inspect_test.rb", "test/unit/in_state_ordering_constraint_test.rb", "test/unit/metaclass_test.rb", "test/unit/method_matcher_test.rb", "test/unit/mock_test.rb", "test/unit/mockery_test.rb", "test/unit/multiple_yields_test.rb", "test/unit/no_yields_test.rb", "test/unit/object_inspect_test.rb", "test/unit/object_test.rb", "test/unit/parameter_matchers/all_of_test.rb", "test/unit/parameter_matchers/any_of_test.rb", "test/unit/parameter_matchers/anything_test.rb", "test/unit/parameter_matchers/equals_test.rb", "test/unit/parameter_matchers/has_entries_test.rb", "test/unit/parameter_matchers/has_entry_test.rb", "test/unit/parameter_matchers/has_key_test.rb", "test/unit/parameter_matchers/has_value_test.rb", "test/unit/parameter_matchers/includes_test.rb", "test/unit/parameter_matchers/instance_of_test.rb", "test/unit/parameter_matchers/is_a_test.rb", "test/unit/parameter_matchers/kind_of_test.rb", "test/unit/parameter_matchers/not_test.rb", "test/unit/parameter_matchers/regexp_matches_test.rb", "test/unit/parameter_matchers/responds_with_test.rb", "test/unit/parameter_matchers/stub_matcher.rb", "test/unit/parameter_matchers/yaml_equivalent_test.rb", "test/unit/parameters_matcher_test.rb", "test/unit/return_values_test.rb", "test/unit/sequence_test.rb", "test/unit/single_return_value_test.rb", "test/unit/single_yield_test.rb", "test/unit/state_machine_test.rb", "test/unit/string_inspect_test.rb", "test/unit/yield_parameters_test.rb", "examples/misc.rb", "examples/mocha.rb", "examples/stubba.rb", "COPYING", "MIT-LICENSE", "Rakefile", "README", "RELEASE"]
- s.has_rdoc = true
+ s.files = ["lib/mocha/any_instance_method.rb", "lib/mocha/api.rb", "lib/mocha/argument_iterator.rb", "lib/mocha/backtrace_filter.rb", "lib/mocha/cardinality.rb", "lib/mocha/central.rb", "lib/mocha/change_state_side_effect.rb", "lib/mocha/class_method.rb", "lib/mocha/configuration.rb", "lib/mocha/deprecation.rb", "lib/mocha/exception_raiser.rb", "lib/mocha/expectation.rb", "lib/mocha/expectation_error.rb", "lib/mocha/expectation_list.rb", "lib/mocha/in_state_ordering_constraint.rb", "lib/mocha/inspect.rb", "lib/mocha/instance_method.rb", "lib/mocha/integration/mini_test/assertion_counter.rb", "lib/mocha/integration/mini_test/version_131_and_above.rb", "lib/mocha/integration/mini_test.rb", "lib/mocha/integration/test_unit/assertion_counter.rb", "lib/mocha/integration/test_unit/gem_version_200.rb", "lib/mocha/integration/test_unit/gem_version_201_and_above.rb", "lib/mocha/integration/test_unit/ruby_version_185_and_below.rb", "lib/mocha/integration/test_unit/ruby_version_186_and_above.rb", "lib/mocha/integration/test_unit.rb", "lib/mocha/integration.rb", "lib/mocha/is_a.rb", "lib/mocha/logger.rb", "lib/mocha/metaclass.rb", "lib/mocha/method_matcher.rb", "lib/mocha/mock.rb", "lib/mocha/mockery.rb", "lib/mocha/module_method.rb", "lib/mocha/multiple_yields.rb", "lib/mocha/names.rb", "lib/mocha/no_yields.rb", "lib/mocha/object.rb", "lib/mocha/parameter_matchers/all_of.rb", "lib/mocha/parameter_matchers/any_of.rb", "lib/mocha/parameter_matchers/any_parameters.rb", "lib/mocha/parameter_matchers/anything.rb", "lib/mocha/parameter_matchers/base.rb", "lib/mocha/parameter_matchers/equals.rb", "lib/mocha/parameter_matchers/has_entries.rb", "lib/mocha/parameter_matchers/has_entry.rb", "lib/mocha/parameter_matchers/has_key.rb", "lib/mocha/parameter_matchers/has_value.rb", "lib/mocha/parameter_matchers/includes.rb", "lib/mocha/parameter_matchers/instance_of.rb", "lib/mocha/parameter_matchers/is_a.rb", "lib/mocha/parameter_matchers/kind_of.rb", "lib/mocha/parameter_matchers/not.rb", "lib/mocha/parameter_matchers/object.rb", "lib/mocha/parameter_matchers/optionally.rb", "lib/mocha/parameter_matchers/regexp_matches.rb", "lib/mocha/parameter_matchers/responds_with.rb", "lib/mocha/parameter_matchers/yaml_equivalent.rb", "lib/mocha/parameter_matchers.rb", "lib/mocha/parameters_matcher.rb", "lib/mocha/pretty_parameters.rb", "lib/mocha/return_values.rb", "lib/mocha/sequence.rb", "lib/mocha/single_return_value.rb", "lib/mocha/single_yield.rb", "lib/mocha/standalone.rb", "lib/mocha/state_machine.rb", "lib/mocha/stubbing_error.rb", "lib/mocha/unexpected_invocation.rb", "lib/mocha/yield_parameters.rb", "lib/mocha.rb", "lib/mocha_standalone.rb", "lib/stubba.rb", "test/acceptance/acceptance_test_helper.rb", "test/acceptance/api_test.rb", "test/acceptance/bug_18914_test.rb", "test/acceptance/bug_21465_test.rb", "test/acceptance/bug_21563_test.rb", "test/acceptance/expected_invocation_count_test.rb", "test/acceptance/failure_messages_test.rb", "test/acceptance/minitest_test.rb", "test/acceptance/mocha_example_test.rb", "test/acceptance/mocha_test_result_test.rb", "test/acceptance/mock_test.rb", "test/acceptance/mock_with_initializer_block_test.rb", "test/acceptance/mocked_methods_dispatch_test.rb", "test/acceptance/optional_parameters_test.rb", "test/acceptance/parameter_matcher_test.rb", "test/acceptance/partial_mocks_test.rb", "test/acceptance/return_value_test.rb", "test/acceptance/sequence_test.rb", "test/acceptance/states_test.rb", "test/acceptance/stub_any_instance_method_test.rb", "test/acceptance/stub_class_method_test.rb", "test/acceptance/stub_everything_test.rb", "test/acceptance/stub_instance_method_test.rb", "test/acceptance/stub_module_method_test.rb", "test/acceptance/stub_test.rb", "test/acceptance/stubba_example_test.rb", "test/acceptance/stubba_test.rb", "test/acceptance/stubba_test_result_test.rb", "test/acceptance/stubbing_error_backtrace_test.rb", "test/acceptance/stubbing_method_unnecessarily_test.rb", "test/acceptance/stubbing_non_existent_any_instance_method_test.rb", "test/acceptance/stubbing_non_existent_class_method_test.rb", "test/acceptance/stubbing_non_existent_instance_method_test.rb", "test/acceptance/stubbing_non_public_any_instance_method_test.rb", "test/acceptance/stubbing_non_public_class_method_test.rb", "test/acceptance/stubbing_non_public_instance_method_test.rb", "test/acceptance/stubbing_on_non_mock_object_test.rb", "test/deprecation_disabler.rb", "test/execution_point.rb", "test/method_definer.rb", "test/simple_counter.rb", "test/test_helper.rb", "test/test_runner.rb", "test/unit/any_instance_method_test.rb", "test/unit/array_inspect_test.rb", "test/unit/backtrace_filter_test.rb", "test/unit/cardinality_test.rb", "test/unit/central_test.rb", "test/unit/change_state_side_effect_test.rb", "test/unit/class_method_test.rb", "test/unit/configuration_test.rb", "test/unit/date_time_inspect_test.rb", "test/unit/exception_raiser_test.rb", "test/unit/expectation_list_test.rb", "test/unit/expectation_test.rb", "test/unit/hash_inspect_test.rb", "test/unit/in_state_ordering_constraint_test.rb", "test/unit/metaclass_test.rb", "test/unit/method_matcher_test.rb", "test/unit/mock_test.rb", "test/unit/mockery_test.rb", "test/unit/multiple_yields_test.rb", "test/unit/no_yields_test.rb", "test/unit/object_inspect_test.rb", "test/unit/object_test.rb", "test/unit/parameter_matchers/all_of_test.rb", "test/unit/parameter_matchers/any_of_test.rb", "test/unit/parameter_matchers/anything_test.rb", "test/unit/parameter_matchers/equals_test.rb", "test/unit/parameter_matchers/has_entries_test.rb", "test/unit/parameter_matchers/has_entry_test.rb", "test/unit/parameter_matchers/has_key_test.rb", "test/unit/parameter_matchers/has_value_test.rb", "test/unit/parameter_matchers/includes_test.rb", "test/unit/parameter_matchers/instance_of_test.rb", "test/unit/parameter_matchers/is_a_test.rb", "test/unit/parameter_matchers/kind_of_test.rb", "test/unit/parameter_matchers/not_test.rb", "test/unit/parameter_matchers/regexp_matches_test.rb", "test/unit/parameter_matchers/responds_with_test.rb", "test/unit/parameter_matchers/stub_matcher.rb", "test/unit/parameter_matchers/yaml_equivalent_test.rb", "test/unit/parameters_matcher_test.rb", "test/unit/return_values_test.rb", "test/unit/sequence_test.rb", "test/unit/single_return_value_test.rb", "test/unit/single_yield_test.rb", "test/unit/state_machine_test.rb", "test/unit/string_inspect_test.rb", "test/unit/yield_parameters_test.rb", "examples/misc.rb", "examples/mocha.rb", "examples/stubba.rb", "COPYING", "MIT-LICENSE", "Rakefile", "README", "RELEASE"]
s.homepage = %q{http://mocha.rubyforge.org}
s.rdoc_options = ["--title", "Mocha", "--main", "README", "--line-numbers"]
s.require_paths = ["lib"]
s.rubyforge_project = %q{mocha}
- s.rubygems_version = %q{1.3.1}
+ s.rubygems_version = %q{1.3.4}
s.summary = %q{Mocking and stubbing library}
if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 2
+ s.specification_version = 3
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<rake>, [">= 0"])

0 comments on commit 6450247

Please sign in to comment.