-
-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable deprecation warning by the default [Feature #16345]
And `-w` option turns it on.
- Loading branch information
Showing
7 changed files
with
48 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
require_relative '../../spec_helper' | ||
|
||
describe "Data" do | ||
it "is a subclass of Object" do | ||
suppress_warning do | ||
Data.superclass.should == Object | ||
ruby_version_is ""..."3.0" do | ||
describe "Data" do | ||
it "is a subclass of Object" do | ||
suppress_warning do | ||
Data.superclass.should == Object | ||
end | ||
end | ||
end | ||
|
||
it "is deprecated" do | ||
-> { Data }.should complain(/constant ::Data is deprecated/) | ||
it "is deprecated" do | ||
-> { Data }.should complain(/constant ::Data is deprecated/) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
require_relative '../../spec_helper' | ||
require_relative 'shared/key' | ||
|
||
describe "ENV.index" do | ||
it_behaves_like :env_key, :index | ||
ruby_version_is ""..."3.0" do | ||
describe "ENV.index" do | ||
it_behaves_like :env_key, :index | ||
|
||
it "warns about deprecation" do | ||
-> do | ||
ENV.index("foo") | ||
end.should complain(/warning: ENV.index is deprecated; use ENV.key/) | ||
it "warns about deprecation" do | ||
-> do | ||
ENV.index("foo") | ||
end.should complain(/warning: ENV.index is deprecated; use ENV.key/) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
require_relative '../../spec_helper' | ||
|
||
describe "Fixnum" do | ||
it "is unified into Integer" do | ||
suppress_warning do | ||
Fixnum.should equal(Integer) | ||
ruby_version_is ""..."3.0" do | ||
describe "Fixnum" do | ||
it "is unified into Integer" do | ||
suppress_warning do | ||
Fixnum.should equal(Integer) | ||
end | ||
end | ||
end | ||
|
||
it "is deprecated" do | ||
-> { Fixnum }.should complain(/constant ::Fixnum is deprecated/) | ||
it "is deprecated" do | ||
-> { Fixnum }.should complain(/constant ::Fixnum is deprecated/) | ||
end | ||
end | ||
end | ||
|
||
describe "Bignum" do | ||
it "is unified into Integer" do | ||
suppress_warning do | ||
Bignum.should equal(Integer) | ||
describe "Bignum" do | ||
it "is unified into Integer" do | ||
suppress_warning do | ||
Bignum.should equal(Integer) | ||
end | ||
end | ||
end | ||
|
||
it "is deprecated" do | ||
-> { Bignum }.should complain(/constant ::Bignum is deprecated/) | ||
it "is deprecated" do | ||
-> { Bignum }.should complain(/constant ::Bignum is deprecated/) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters