Project

General

Profile

Actions

Bug #897

closed

Kenel#describe should be private in minitest/spec

Added by okkez (okkez _) almost 14 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
ruby -v:
Backport:
[ruby-core:20611]

Description

=begin
I think Kernel#describe should be private.

code:

OK

describe 'aaa' do
do_something
end

NG (I think that this code should raise an exception)

99.describe 'bbb' do
do_something
end

patch:

Index: lib/minitest/spec.rb

--- lib/minitest/spec.rb (revision 20785)
+++ lib/minitest/spec.rb (working copy)
@@ -54,6 +54,7 @@
end

module Kernel

  • private
    def describe desc, &block
    cls = Class.new(MiniTest::Spec)
    Object.const_set desc.to_s.split(/\W+/).map { |s| s.capitalize }.join, cls
    =end
Actions #1

Updated by yugui (Yuki Sonoda) almost 14 years ago

  • Due date set to 12/24/2008
  • Target version set to 1.9.1 Release Candidate

=begin

=end

Actions #2

Updated by zenspider (Ryan Davis) almost 14 years ago

  • Status changed from Open to Closed

=begin

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0