Skip to content

Commit f8746c6

Browse files
committed
Fix Warning.warn specs
1 parent 66547f4 commit f8746c6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spec/ruby/core/warning/warn_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ def Warning.warn(msg)
7979
Warning[:deprecated] = true
8080
begin
8181
-> {
82-
warn("foo", category: :deprecated)
83-
}.should complain("foo\n")
82+
Warning.warn("foo", category: :deprecated)
83+
}.should complain("foo")
8484
ensure
8585
Warning[:deprecated] = warn_deprecated
8686
end
@@ -91,8 +91,8 @@ def Warning.warn(msg)
9191
Warning[:experimental] = true
9292
begin
9393
-> {
94-
warn("foo", category: :experimental)
95-
}.should complain("foo\n")
94+
Warning.warn("foo", category: :experimental)
95+
}.should complain("foo")
9696
ensure
9797
Warning[:experimental] = warn_experimental
9898
end
@@ -103,7 +103,7 @@ def Warning.warn(msg)
103103
Warning[:deprecated] = false
104104
begin
105105
-> {
106-
warn("foo", category: :deprecated)
106+
Warning.warn("foo", category: :deprecated)
107107
}.should_not complain
108108
ensure
109109
Warning[:deprecated] = warn_deprecated
@@ -115,7 +115,7 @@ def Warning.warn(msg)
115115
Warning[:experimental] = false
116116
begin
117117
-> {
118-
warn("foo", category: :experimental)
118+
Warning.warn("foo", category: :experimental)
119119
}.should_not complain
120120
ensure
121121
Warning[:experimental] = warn_experimental

0 commit comments

Comments
 (0)