Permalink
Browse files

Allow mocha 0.14.*

  • Loading branch information...
1 parent 67bf7c7 commit ffc03c3fbfa16ddccd58f605a8ac38bcd7d34955 @dyfrgi dyfrgi committed with jferris Jun 21, 2013
Showing with 3 additions and 3 deletions.
  1. +1 −1 bourne.gemspec
  2. +2 −2 test/unit/mock_test.rb
View
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]
# Follow instructions in test/unit/mock_test.rb to update.
- s.add_dependency('mocha', '~> 0.13.2')
+ s.add_dependency('mocha', '>= 0.13.2', '< 0.15')
s.add_development_dependency('rake')
end
View
@@ -49,9 +49,9 @@ def test_should_be_equal
end
if RUBY_VERSION < '1.9'
- OBJECT_METHODS = STANDARD_OBJECT_PUBLIC_INSTANCE_METHODS.reject { |m| m =~ /^__.*__$/ }
+ OBJECT_METHODS = STANDARD_OBJECT_PUBLIC_INSTANCE_METHODS.reject { |m| m =~ /^__.*__$/ || ["method_missing", "singleton_method_undefined", "initialize"].include?(m)}
else
- OBJECT_METHODS = STANDARD_OBJECT_PUBLIC_INSTANCE_METHODS.reject { |m| m =~ /^__.*__$/ || m == :object_id }
+ OBJECT_METHODS = STANDARD_OBJECT_PUBLIC_INSTANCE_METHODS.reject { |m| m =~ /^__.*__$/ || [:object_id, :method_missing, :singleton_method_undefined, :initialize, :String, :singleton_method_added].include?(m) }
end
def test_should_be_able_to_mock_standard_object_methods

0 comments on commit ffc03c3

Please sign in to comment.