diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-29 19:46:46 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-29 19:46:46 +0000 |
commit | 87bcbf9ef53de9db889ce51de057f26f55afe7d3 (patch) | |
tree | 26218a29274bfb3ea03d41cde10071107c8da5df /spec/ruby/core/module/remove_method_spec.rb | |
parent | 0c03a89ecd71ebdc1ea983264424ba5c46f8c4e1 (diff) |
Cherrypick 9f8d3d0 from ruby/spec
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/core/module/remove_method_spec.rb')
-rw-r--r-- | spec/ruby/core/module/remove_method_spec.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/ruby/core/module/remove_method_spec.rb b/spec/ruby/core/module/remove_method_spec.rb index f98cfa8daa..d82e0c65ca 100644 --- a/spec/ruby/core/module/remove_method_spec.rb +++ b/spec/ruby/core/module/remove_method_spec.rb @@ -20,8 +20,15 @@ describe "Module#remove_method" do @module = Module.new { def method_to_remove; end } end - it "is a private method" do - Module.should have_private_instance_method(:remove_method, false) + ruby_version_is ''...'2.5' do + it "is a private method" do + Module.should have_private_instance_method(:remove_method, false) + end + end + ruby_version_is '2.5' do + it "is a public method" do + Module.should have_public_instance_method(:remove_method, false) + end end it "removes the method from a class" do |