rspec-centaur-pride 0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +36 -0
- data/lib/rspec/centaur_pride.rb +38 -0
- metadata +81 -0
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# centaur-pride
|
2
|
+
|
3
|
+
![Screenshot](https://github.com/timlinquist/rspec-centaur-pride/raw/master/images/screenshot.png)
|
4
|
+
|
5
|
+
Take pride in your centaur!
|
6
|
+
|
7
|
+
## How to use centaur-pride
|
8
|
+
|
9
|
+
To use centaur-pride, you need to call `rspec` kind of like this:
|
10
|
+
|
11
|
+
rspec --require rspec/centaur-pride --format RSpec::CentaurPride
|
12
|
+
|
13
|
+
Or put those options in your `.rspec` file.
|
14
|
+
|
15
|
+
## Contributing to centaur-pride
|
16
|
+
|
17
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
18
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
19
|
+
* Fork the project
|
20
|
+
* Start a feature/bugfix branch
|
21
|
+
* Commit and push until you are happy with your contribution
|
22
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
23
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
24
|
+
|
25
|
+
## Credits
|
26
|
+
|
27
|
+
I didn't do much here except create the gem and inherit from RSpec::Pride. Kudos to Robert Pitts and Tim Pope whom already have a gem for formatting
|
28
|
+
test output as a centaur. I am using their print method in this formatter. Another kudos to ferrous26 who wrote the RSpec::Pride formatter that this formatter inherits from.
|
29
|
+
|
30
|
+
* https://github.com/ferrous26/rspec-pride/
|
31
|
+
* https://github.com/tpope/test-align-centaur
|
32
|
+
* https://github.com/rbxbx/centaur
|
33
|
+
|
34
|
+
## Copyright
|
35
|
+
|
36
|
+
Copyright (c) 2012 Tim Linquist. See LICENSE.txt for further details.
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'centaur'
|
2
|
+
require 'rspec/pride'
|
3
|
+
|
4
|
+
module RSpec
|
5
|
+
class CentaurPride < Pride
|
6
|
+
def initialize io
|
7
|
+
super
|
8
|
+
@centaur = String::CENTAUR.chomp
|
9
|
+
end
|
10
|
+
|
11
|
+
def draw_centaur_with arg
|
12
|
+
if @centaur.empty? #draw centaurs until we run out of characters dots (specs)
|
13
|
+
@centaur = "\n" + String::CENTAUR.chomp
|
14
|
+
end
|
15
|
+
|
16
|
+
# Print char (space) unless it is an 'x'
|
17
|
+
while char = @centaur.slice!(0)
|
18
|
+
break if char == 'x'
|
19
|
+
output.print(char)
|
20
|
+
end
|
21
|
+
|
22
|
+
output.print(arg)
|
23
|
+
end
|
24
|
+
|
25
|
+
def example_passed example
|
26
|
+
draw_centaur_with pass
|
27
|
+
end
|
28
|
+
|
29
|
+
def example_failed example
|
30
|
+
draw_centaur_with failure
|
31
|
+
end
|
32
|
+
|
33
|
+
def example_pending example
|
34
|
+
draw_centaur_with pending
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
metadata
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rspec-centaur-pride
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.1'
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Tim Linquist
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-04-02 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: centaur
|
16
|
+
requirement: &70265979853840 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.0.2
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70265979853840
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rspec
|
27
|
+
requirement: &70265979853140 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ~>
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.6'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70265979853140
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rspec-pride
|
38
|
+
requirement: &70265979852500 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '2.1'
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70265979852500
|
47
|
+
description: Creates a fantastic centaur by using rspec-pride to accessorize
|
48
|
+
email: tim.linquist@gmail.com
|
49
|
+
executables: []
|
50
|
+
extensions: []
|
51
|
+
extra_rdoc_files:
|
52
|
+
- README.md
|
53
|
+
files:
|
54
|
+
- lib/rspec/centaur_pride.rb
|
55
|
+
- README.md
|
56
|
+
homepage: http://github.com/timlinquist/rspec-centaur-pride
|
57
|
+
licenses:
|
58
|
+
- MIT
|
59
|
+
post_install_message:
|
60
|
+
rdoc_options: []
|
61
|
+
require_paths:
|
62
|
+
- lib
|
63
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
71
|
+
requirements:
|
72
|
+
- - ! '>='
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
requirements: []
|
76
|
+
rubyforge_project:
|
77
|
+
rubygems_version: 1.8.15
|
78
|
+
signing_key:
|
79
|
+
specification_version: 3
|
80
|
+
summary: Make your tests powerful with a lively centaur!
|
81
|
+
test_files: []
|