File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -290,6 +290,7 @@ def name # :nodoc:
290290 end
291291
292292 alias to_s name
293+ alias inspect name
293294
294295 attr_reader :desc # :nodoc:
295296 alias specify it
Original file line number Diff line number Diff line change @@ -939,6 +939,16 @@ def test_name
939939 assert_equal "ExampleB::random_method::addl_context" , spec_c . name
940940 end
941941
942+ def test_inspect
943+ spec_a = describe ExampleA do ; end
944+ spec_b = describe ExampleB , :random_method do ; end
945+ spec_c = describe ExampleB , :random_method , :addl_context do ; end
946+
947+ assert_equal "ExampleA" , spec_a . inspect
948+ assert_equal "ExampleB::random_method" , spec_b . inspect
949+ assert_equal "ExampleB::random_method::addl_context" , spec_c . inspect
950+ end
951+
942952 def test_name2
943953 assert_equal "NamedExampleA" , NamedExampleA . name
944954 assert_equal "NamedExampleB" , NamedExampleB . name
You can’t perform that action at this time.
0 commit comments