This repository was archived by the owner on Nov 30, 2024. It is now read-only.
File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1078,16 +1078,17 @@ def foo; end
1078
1078
1079
1079
let ( :object ) { klass . new }
1080
1080
1081
+ # The map(&:to_sym) is for legacy Ruby compatability and can be dropped in RSpec 4
1081
1082
it "maintains the method in the list of private_methods" do
1082
1083
expect {
1083
1084
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 )
1085
1086
end
1086
1087
1087
1088
it "maintains the methods exclusion from the list of public_methods" do
1088
1089
expect {
1089
1090
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 )
1091
1092
end
1092
1093
1093
1094
it "maintains the methods visibility" do
@@ -1129,7 +1130,7 @@ def foo; end
1129
1130
1130
1131
it "restores a stubbed private method after the spec is run" do
1131
1132
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
1133
1134
end
1134
1135
1135
1136
it "ensures that the restored method behaves as it originally did" do
You can’t perform that action at this time.
0 commit comments