nanotest_extensions 0.6 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -3,7 +3,9 @@ LICENSE
3
3
  Manifest
4
4
  README.rdoc
5
5
  README_CONTEXTS.rdoc
6
+ README_FOCUS.rdoc
6
7
  README_SPEC.rdoc
8
+ README_STATS.rdoc
7
9
  Rakefile
8
10
  lib/nanotest/contexts.rb
9
11
  lib/nanotest/focus.rb
data/README.rdoc CHANGED
@@ -5,6 +5,8 @@ See each extension's README for details and examples:
5
5
 
6
6
  * nanotest/spec[http://github.com/mynyml/nanotest_extensions/blob/master/README_SPEC.rdoc]
7
7
  * nanotest/contexts[http://github.com/mynyml/nanotest_extensions/blob/master/README_CONTEXTS.rdoc]
8
+ * nanotest/focus[http://github.com/mynyml/nanotest_extensions/blob/master/README_FOCUS.rdoc]
9
+ * nanotest/stats[http://github.com/mynyml/nanotest_extensions/blob/master/README_STATS.rdoc]
8
10
 
9
11
  === Install
10
12
 
data/README_FOCUS.rdoc ADDED
@@ -0,0 +1,26 @@
1
+ === Summary
2
+
3
+ Easily focus assertions.
4
+
5
+ Simply call #focus, and the subsequent assertion will be run. Can be called
6
+ multiple times. Any assertion that is not focused will never run (unless focus
7
+ is never called, in which case nanotest will run normally). Will also work
8
+ across all test files.
9
+
10
+ === Examples
11
+
12
+ require 'nanotest'
13
+ require 'nanotest/focus'
14
+ include Nanotest
15
+
16
+ assert("this test won't run") { false }
17
+
18
+ focus
19
+ assert { true }
20
+ assert("this test won't run") { false }
21
+
22
+ focus
23
+ assert { true }
24
+
25
+ This will only run the two tests following the #focus calls, and the "suite"
26
+ will pass.
data/README_STATS.rdoc ADDED
@@ -0,0 +1,22 @@
1
+ === Summary
2
+
3
+ Appends total test time, number of assertions and number of failures.
4
+
5
+ === Examples
6
+
7
+ require 'nanotest'
8
+ require 'nanotest/stats'
9
+ include Nanotest
10
+
11
+ assert { true }
12
+ assert { true }
13
+ assert { false }
14
+ assert { false }
15
+
16
+ outputs:
17
+
18
+ ..FF
19
+ (stats_example.rb:007) assertion failed
20
+ (stats_example.rb:008) assertion failed
21
+
22
+ (0.000191 seconds) 4 assertions, 2 failures
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.homepage = "http://github.com/mynyml/nanotest_extensions"
8
8
  s.rubyforge_project = "nanotest_extensions"
9
9
  s.require_path = "lib"
10
- s.version = "0.6"
10
+ s.version = "0.6.1"
11
11
  s.files = File.read("Manifest").strip.split("\n")
12
12
 
13
13
  s.add_development_dependency 'nanotest'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanotest_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.6"
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Aumont
@@ -36,7 +36,9 @@ files:
36
36
  - Manifest
37
37
  - README.rdoc
38
38
  - README_CONTEXTS.rdoc
39
+ - README_FOCUS.rdoc
39
40
  - README_SPEC.rdoc
41
+ - README_STATS.rdoc
40
42
  - Rakefile
41
43
  - lib/nanotest/contexts.rb
42
44
  - lib/nanotest/focus.rb