mattly (owner)

Revisions

  • ebf5c4 mattly Sun Jun 14 12:07:54 -0700 2009
gist: 129781 Download_button fork
public
Public Clone URL: git://gist.github.com/129781.git
Text only
1
2
3
4
5
6
7
8
9
class MiniTest::Spec
  # beacuse test names are really just comments, and therefore a code smell
  def self.expect(desc=nil, &block)
    @counter ||= 0; @counter += 1
    desc ||= "[#{@counter}]"
    name = ["test_", description_stack.join(' '), desc].join(' ')
    define_method name, &block
  end
end