instant_disappointment 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ LICENSE
2
+
3
+ The MIT License
4
+
5
+ Copyright (c) 2010 Danny Burkes
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in
15
+ all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ THE SOFTWARE.
24
+
data/README.textile ADDED
@@ -0,0 +1,67 @@
1
+ h1. InstantDisappointment
2
+
3
+ InstantDisappointmentFormatter is an RSpec formatter that combines the succinct output of ProgressBarFormatter with the fast failure details of SpecDocFormatter.
4
+
5
+ If you have a large suite of specs, and they take a long time to run, it's likely you are using the ProgressBarFormatter (@--format p@) to squelch RSpec's noisy output and run your specs faster. Unfortunately, the ProgressBarFormatter doesn't print failure details until all specs are finished, so, if you get a failure early in your specs, you have to wait a long time before you can see the details of the failure.
6
+
7
+ Well, no more- the InsantDisappointmentFormatter behaves like ProgressBarFormatter when specs pass or are pending, but prints the details of failing specs immediately, so you can get on with the fixing while the specs continue to run in the background.
8
+
9
+ h1. Installation
10
+
11
+ <pre>
12
+ gem install instant_disappointment
13
+ </pre>
14
+
15
+ h1. Usage
16
+
17
+ If you run @spec@ from the command line:
18
+
19
+ <pre>
20
+ spec --require instant_disappointment_formatter --formatter Spec::Runner::Formatter::InstantDisappointmentFormatter <your_specfiles_here>
21
+ </pre>
22
+
23
+ If you use a @spec.opts@ file:
24
+
25
+ <pre>
26
+ --require instant_disappointment_formatter
27
+ --formatter Spec::Runner::Formatter::InstantDisappointmentFormatter
28
+ </pre>
29
+
30
+ h1. Example
31
+
32
+ h2. Without InstantDispappointment
33
+
34
+ <pre>
35
+ spec spec
36
+ ......................F......................................................................
37
+
38
+ 1)
39
+ 'PeoplePlacesThings::PersonName should not parse middle initial as suffix' FAILED
40
+ expected: "browxn",
41
+ got: "brown" (using ==)
42
+ ./spec/person_name_spec.rb:44:
43
+
44
+ Finished in 0.079263 seconds
45
+
46
+ 93 examples, 1 failure
47
+ </pre>
48
+
49
+ h2. With InstantDisappointment
50
+
51
+ <pre>
52
+ spec -r instant_disappointment_formatter -f Spec::Runner::Formatter::InstantDisappointmentFormatter spec
53
+ ......................F
54
+
55
+ 1)
56
+ 'PeoplePlacesThings::PersonName should not parse middle initial as suffix' FAILED
57
+ expected: "browxn",
58
+ got: "brown" (using ==)
59
+ /Users/dburkes/work/people_places_things/spec/person_name_spec.rb:44:
60
+
61
+ ......................................................................
62
+ Finished in 0.069332 seconds
63
+
64
+ 93 examples, 1 failure
65
+ </pre>
66
+
67
+ _BUENO!_
@@ -0,0 +1,30 @@
1
+ require 'spec/runner/formatter/progress_bar_formatter'
2
+
3
+ module Spec
4
+ module Runner
5
+ module Formatter
6
+ class InstantDisappointmentFormatter < ProgressBarFormatter
7
+ VERSION = "1.0.0"
8
+ alias :example_failed_without_instant_disappointment :example_failed
9
+ alias :dump_failure_without_lockout :dump_failure
10
+
11
+ def example_failed(example, counter, failure)
12
+ example_failed_without_instant_disappointment(example, counter, failure)
13
+ puts
14
+ dump_failure(counter, failure)
15
+ puts
16
+ output.flush
17
+ end
18
+
19
+ def dump_failure(counter, failure)
20
+ return if @in_dump
21
+ super
22
+ end
23
+
24
+ def start_dump
25
+ @in_dump = true
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
metadata ADDED
@@ -0,0 +1,75 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: instant_disappointment
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 0
8
+ - 0
9
+ version: 1.0.0
10
+ platform: ruby
11
+ authors:
12
+ - Danny Burkes
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-10-22 00:00:00 -07:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: rspec
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ version: "0"
30
+ type: :development
31
+ version_requirements: *id001
32
+ description: RSpec formatter that lets you down quickly
33
+ email: dburkes@netable.com
34
+ executables: []
35
+
36
+ extensions: []
37
+
38
+ extra_rdoc_files: []
39
+
40
+ files:
41
+ - README.textile
42
+ - LICENSE
43
+ - lib/instant_disappointment_formatter.rb
44
+ has_rdoc: true
45
+ homepage: http://github.com/dburkes/instant_disappointment
46
+ licenses: []
47
+
48
+ post_install_message:
49
+ rdoc_options: []
50
+
51
+ require_paths:
52
+ - lib
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ segments:
58
+ - 0
59
+ version: "0"
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ segments:
65
+ - 0
66
+ version: "0"
67
+ requirements: []
68
+
69
+ rubyforge_project: instant_disappointment
70
+ rubygems_version: 1.3.6
71
+ signing_key:
72
+ specification_version: 3
73
+ summary: No time for ping pong- start fixing the specs now!
74
+ test_files: []
75
+