Skip to content
Browse files

Update docs

  • Loading branch information...
1 parent 432ad6a commit d44cfa5a59c2c284a6ef2cc33d7f95d516620163 @wojtekmach committed Mar 18, 2012
Showing with 13 additions and 5 deletions.
  1. +2 −0 .gitignore
  2. +1 −0 .yardopts
  3. +2 −1 README.md
  4. +8 −4 lib/minitest-metadata.rb
View
2 .gitignore
@@ -1,2 +1,4 @@
pkg
.*.sw*
+.yardoc
+doc
View
1 .yardopts
@@ -0,0 +1 @@
+--no-private
View
3 README.md
@@ -1,6 +1,7 @@
# minitest-metadata
-* https://github.com/wojtekmach/minitest-metadata
+* Source code: https://github.com/wojtekmach/minitest-metadata
+* API reference: http://rubydoc.info/github/wojtekmach/minitest-metadata/master/frames
## Description
View
12 lib/minitest-metadata.rb
@@ -1,23 +1,27 @@
require 'minitest/spec'
-class MiniTest::Metadata
+# Metadata support for minitest/spec
+module MiniTest::Metadata
+ # Current minitest-metadata version
VERSION = '0.1.0'
end
class MiniTest::Spec
- # Returns Hash metadata for each test method
+ # Returns Hash metadata for class' test methods
def self.metadata
@metadata ||= {}
end
- # Returns Hash metadata for current test method
+ # Returns Hash metadata for currently running test
def metadata
self.class.metadata[__name__] || {}
end
class << self
- alias old_it it
+ # @private
+ alias :old_it :it
+ # @private
def it(description = "", metadata = {}, &block)
methods = test_methods
ret = old_it description, &block

0 comments on commit d44cfa5

Please sign in to comment.
Something went wrong with that request. Please try again.