This repository was archived by the owner on Nov 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1078,16 +1078,17 @@ def foo; end
10781078
10791079 let ( :object ) { klass . new }
10801080
1081+ # The map(&:to_sym) is for legacy Ruby compatability and can be dropped in RSpec 4
10811082 it "maintains the method in the list of private_methods" do
10821083 expect {
10831084 verify_all
1084- } . to_not change { object . private_methods . include? ( :private_method ) } . from ( true )
1085+ } . to_not change { object . private_methods . map ( & :to_sym ) . include? ( :private_method ) } . from ( true )
10851086 end
10861087
10871088 it "maintains the methods exclusion from the list of public_methods" do
10881089 expect {
10891090 verify_all
1090- } . to_not change { object . public_methods . include? ( :private_method ) } . from ( false )
1091+ } . to_not change { object . public_methods . map ( & :to_sym ) . include? ( :private_method ) } . from ( false )
10911092 end
10921093
10931094 it "maintains the methods visibility" do
@@ -1129,7 +1130,7 @@ def foo; end
11291130
11301131 it "restores a stubbed private method after the spec is run" do
11311132 expect ( klass . private_method_defined? ( :private_method ) ) . to be_truthy
1132- expect ( klass . new . private_methods ) . to include :private_method
1133+ expect ( klass . new . private_methods . map ( & :to_sym ) ) . to include :private_method
11331134 end
11341135
11351136 it "ensures that the restored method behaves as it originally did" do
You can’t perform that action at this time.
0 commit comments