test/assertions.rb in mocha-1.1.0 vs test/assertions.rb in mocha-1.2.0
- old
+ new
@@ -1,6 +1,8 @@
+require 'mocha/ruby_version'
+
module Assertions
- def assert_method_visiblity(object, method_name, visiblity)
- method_key = RUBY_VERSION < '1.9' ? method_name.to_s : method_name.to_sym
- assert object.send("#{visiblity}_methods", false).include?(method_key), "#{method_name} is not #{visiblity}"
+ def assert_method_visibility(object, method_name, visiblity)
+ method_key = Mocha::PRE_RUBY_V19 ? method_name.to_s : method_name.to_sym
+ assert object.send("#{visiblity}_methods").include?(method_key), "#{method_name} is not #{visiblity}"
end
-end
\ No newline at end of file
+end