diff options
author | Benoit Daloze <eregontp@gmail.com> | 2024-02-05 16:29:57 +0100 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2024-02-05 16:29:57 +0100 |
commit | 40642cd3bc581d3bb402ea5e8e61cdfb868b4f68 (patch) | |
tree | 077cc3ac94f880ce3c8c98322331c01cb1cc9cb8 /spec/ruby/core/class | |
parent | abe07d4bf5f2f848b22e511a647a85c878066adb (diff) |
Update to ruby/spec@3fc4444
Diffstat (limited to 'spec/ruby/core/class')
-rw-r--r-- | spec/ruby/core/class/attached_object_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/class/attached_object_spec.rb b/spec/ruby/core/class/attached_object_spec.rb index 115d5fa563..d97f9cc93e 100644 --- a/spec/ruby/core/class/attached_object_spec.rb +++ b/spec/ruby/core/class/attached_object_spec.rb @@ -19,13 +19,13 @@ ruby_version_is '3.2' do it "raises TypeError if the class is not a singleton class" do a = Class.new - -> { a.attached_object }.should raise_error(TypeError) + -> { a.attached_object }.should raise_error(TypeError, /is not a singleton class/) end it "raises TypeError for special singleton classes" do - -> { nil.singleton_class.attached_object }.should raise_error(TypeError) - -> { true.singleton_class.attached_object }.should raise_error(TypeError) - -> { false.singleton_class.attached_object }.should raise_error(TypeError) + -> { nil.singleton_class.attached_object }.should raise_error(TypeError, /`NilClass' is not a singleton class/) + -> { true.singleton_class.attached_object }.should raise_error(TypeError, /`TrueClass' is not a singleton class/) + -> { false.singleton_class.attached_object }.should raise_error(TypeError, /`FalseClass' is not a singleton class/) end end end |