Skip to content

Commit

Permalink
update test descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Syed Aslam authored and eregon committed Oct 28, 2021
1 parent 7aa8cd0 commit 7d97955
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions language/class_variable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@

ruby_version_is "3.0" do
describe 'Class variable overtaking' do
it "raises Runtime error when a defined class variable is overtaken" do
it "accessing a class variable from the toplevel scope raises a RuntimeError" do
-> do
eval <<-CODE
@@cvar_a = :new_val
CODE
end.should raise_error(RuntimeError, /class variable access from toplevel/)
end

it "raises Runtime error when a child class variable is overtaken" do
it "raises a RuntimeError when a class variable is overtaken by the same definition in an ancestor class" do
a = Class.new()
b = Class.new(a)
b.class_variable_set(:@@cvar, :value)
Expand Down

0 comments on commit 7d97955

Please sign in to comment.