mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@226cfdc
This commit is contained in:
parent
8abfc10605
commit
4053e8ba0d
42 changed files with 470 additions and 84 deletions
|
@ -17,6 +17,19 @@ describe "The class keyword" do
|
|||
eval "class ClassSpecsKeywordWithoutSemicolon end"
|
||||
ClassSpecsKeywordWithoutSemicolon.should be_an_instance_of(Class)
|
||||
end
|
||||
|
||||
it "can redefine a class when called from a block" do
|
||||
ClassSpecs::DEFINE_CLASS.call
|
||||
A.should be_an_instance_of(Class)
|
||||
|
||||
Object.send(:remove_const, :A)
|
||||
defined?(A).should be_nil
|
||||
|
||||
ClassSpecs::DEFINE_CLASS.call
|
||||
A.should be_an_instance_of(Class)
|
||||
ensure
|
||||
Object.send(:remove_const, :A) if defined?(::A)
|
||||
end
|
||||
end
|
||||
|
||||
describe "A class definition" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue