rspec-fuuu 0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ *~
5
+ *.swp
data/README.markdown ADDED
File without changes
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+ require 'rspec/core/rake_task'
4
+
5
+ RSpec::Core::RakeTask.new(:spec) do |spec|
6
+ spec.rspec_opts = "--format RspecFuuu --color"
7
+ spec.pattern = "spec/**/*_spec.rb"
8
+ end
9
+
10
+ task :default => :spec
data/lib/rspec_fuuu.rb ADDED
@@ -0,0 +1,42 @@
1
+ require 'rspec/core/formatters/base_text_formatter'
2
+
3
+ class RspecFuuu < RSpec::Core::Formatters::BaseTextFormatter
4
+
5
+ def initialize(output)
6
+ super(output)
7
+ @failure_rally = 0
8
+ end
9
+
10
+ def print(arg)
11
+ output.print(arg)
12
+ end
13
+
14
+ def example_passed(example)
15
+ super(example)
16
+ @failure_rally = 0
17
+ print green('.')
18
+ end
19
+
20
+ def example_failed(example)
21
+ super(example)
22
+
23
+ if @failure_rally > 0
24
+ print red('U')
25
+ else
26
+ print red('F')
27
+ end
28
+
29
+ @failure_rally += 1
30
+ end
31
+
32
+ def example_pending(example)
33
+ super(example)
34
+ print yellow('*')
35
+ end
36
+
37
+ def start_dump
38
+ super()
39
+ output.puts
40
+ end
41
+
42
+ end
@@ -0,0 +1,18 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'rspec-fuuu'
3
+ s.platform = Gem::Platform::RUBY
4
+ s.version = '0.1'
5
+ s.date = '2011-08-27'
6
+ s.summary = 'Rage guy RSpec tests formatting.'
7
+ s.description = 'Outputs FUUUU for consecutive failures in RSpec test runs.'
8
+ s.authors = ["Steve Jackson"]
9
+ s.email = 'steven.j.jackson@gmail.com'
10
+ s.homepage = "http://sjackson.net"
11
+
12
+ s.files = `git ls-files`.split("\n")
13
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
14
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
15
+ s.require_paths = ["lib"]
16
+
17
+ s.add_runtime_dependency 'rspec', '~> 2.0'
18
+ end
data/spec/fuuu_spec.rb ADDED
@@ -0,0 +1,23 @@
1
+ describe RspecFuuu do
2
+
3
+ def self.pass
4
+ it { }
5
+ end
6
+
7
+ def self.fail
8
+ it { true.should be_false }
9
+ end
10
+
11
+ def self.pend
12
+ it { pending "ehh" }
13
+ end
14
+
15
+ 3.times { pass }
16
+ 1.times { pend }
17
+ 3.times { fail }
18
+ 3.times { pass }
19
+ 5.times { fail }
20
+ 3.times { pass }
21
+
22
+ end
23
+
metadata ADDED
@@ -0,0 +1,63 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rspec-fuuu
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Steve Jackson
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-08-27 00:00:00.000000000 -04:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rspec
17
+ requirement: &18088540 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: '2.0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *18088540
26
+ description: Outputs FUUUU for consecutive failures in RSpec test runs.
27
+ email: steven.j.jackson@gmail.com
28
+ executables: []
29
+ extensions: []
30
+ extra_rdoc_files: []
31
+ files:
32
+ - .gitignore
33
+ - README.markdown
34
+ - Rakefile
35
+ - lib/rspec_fuuu.rb
36
+ - rspec-fuuu.gemspec
37
+ - spec/fuuu_spec.rb
38
+ has_rdoc: true
39
+ homepage: http://sjackson.net
40
+ licenses: []
41
+ post_install_message:
42
+ rdoc_options: []
43
+ require_paths:
44
+ - lib
45
+ required_ruby_version: !ruby/object:Gem::Requirement
46
+ none: false
47
+ requirements:
48
+ - - ! '>='
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ! '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ requirements: []
58
+ rubyforge_project:
59
+ rubygems_version: 1.5.2
60
+ signing_key:
61
+ specification_version: 3
62
+ summary: Rage guy RSpec tests formatting.
63
+ test_files: []