emoji-rspec 0.0.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rspec +4 -0
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/README.md +320 -4
- data/Rakefile +1 -1
- data/emoji-rspec.gemspec +2 -2
- data/examples/show_some_emoji.rb +23 -0
- data/lib/emoji-rspec.rb +1 -3
- data/lib/{emoji/rspec → emoji_test_love}/formatters.rb +0 -0
- data/lib/emoji_test_love/formatters/adventure_time_formatter.rb +53 -0
- data/lib/emoji_test_love/formatters/aggressive_thumbs_formatter.rb +19 -0
- data/lib/emoji_test_love/formatters/books_formatter.rb +19 -0
- data/lib/emoji_test_love/formatters/celebrate_formatter.rb +19 -0
- data/lib/emoji_test_love/formatters/drinking_game_formatter.rb +19 -0
- data/lib/emoji_test_love/formatters/drinking_game_tea_formatter.rb +19 -0
- data/lib/emoji_test_love/formatters/fruit_formatter.rb +19 -0
- data/lib/emoji_test_love/formatters/kanpai_formatter.rb +21 -0
- data/lib/emoji_test_love/formatters/life_hearts_formatter.rb +19 -0
- data/lib/emoji_test_love/formatters/lucky_formatter.rb +19 -0
- data/lib/emoji_test_love/formatters/omkase_formatter.rb +21 -0
- data/lib/emoji_test_love/formatters/smile_dip_formatter.rb +19 -0
- data/lib/emoji_test_love/formatters/smiley_faces_formatter.rb +19 -0
- data/lib/emoji_test_love/formatters/sunshine_formatter.rb +19 -0
- data/lib/emoji_test_love/formatters/thumbs_formatter.rb +19 -0
- data/lib/emoji_test_love/formatters/turtles_formatter.rb +19 -0
- data/lib/emoji_test_love/formatters/waddles_formatter.rb +19 -0
- data/lib/emoji_test_love/formatters/zen_smiles_formatter.rb +19 -0
- data/lib/emoji_test_love/rspec.rb +17 -0
- data/lib/emoji_test_love/rspec/rspec_formatters.rb +21 -0
- data/lib/emoji_test_love/rspec/rspec_integration.rb +75 -0
- data/lib/emoji_test_love/version.rb +3 -0
- data/spec/formatters/adventure_time_formatter_spec.rb +6 -0
- data/spec/formatters/aggressive_thumbs_formatter_spec.rb +6 -0
- data/spec/formatters/books_formatter_spec.rb +6 -0
- data/spec/formatters/celebrate_formatter_spec.rb +6 -0
- data/spec/formatters/drinking_game_formatter_spec.rb +6 -0
- data/spec/formatters/drinking_game_tea_formatter_spec.rb +6 -0
- data/spec/formatters/fruit_formatter_spec.rb +6 -0
- data/spec/formatters/kanpai_formatter_spec.rb +6 -0
- data/spec/formatters/life_hearts_formatter_spec.rb +6 -0
- data/spec/formatters/lucky_formatter_spec.rb +6 -0
- data/spec/formatters/omkase_formatter_spec.rb +6 -0
- data/spec/formatters/smile_dip_formatter_spec.rb +6 -0
- data/spec/formatters/smiley_faces_formatter_spec.rb +6 -0
- data/spec/formatters/sunshine_formatter_spec.rb +6 -0
- data/spec/formatters/thumbs_formatter_spec.rb +6 -0
- data/spec/formatters/turtles_formatter_spec.rb +6 -0
- data/spec/formatters/waddles_formatter_spec.rb +6 -0
- data/spec/formatters/zen_smiles_formatter_spec.rb +6 -0
- data/spec/generating_formatters_spec.rb +143 -0
- data/spec/spec_helper.rb +0 -0
- data/spec/support/shared_examples_for_formatters.rb +6 -0
- metadata +124 -92
- data/lib/emoji/helper.rb +0 -10
- data/lib/emoji/rspec/formatters/adventure_time_formatter.rb +0 -39
- data/lib/emoji/rspec/formatters/aggressive_thumbs_formatter.rb +0 -27
- data/lib/emoji/rspec/formatters/drinking_game_formatter.rb +0 -27
- data/lib/emoji/rspec/formatters/drinking_game_tea_formatter.rb +0 -27
- data/lib/emoji/rspec/formatters/life_hearts_formatter.rb +0 -27
- data/lib/emoji/rspec/formatters/smiles_formatter.rb +0 -27
- data/lib/emoji/rspec/formatters/thumbs_formatter.rb +0 -27
- data/lib/emoji/rspec/formatters/zen_smiles_formatter.rb +0 -27
- data/lib/emoji/rspec/integration.rb +0 -38
- data/lib/emoji/rspec/version.rb +0 -5
- data/spec/example_formatter_spec.rb +0 -40
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f500c570dce2f276c376e78c46ee317547dce0ee
|
4
|
+
data.tar.gz: bc1858be7081994384062ecada8dc20f281903c6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f057b241f394b690661d371d1fa1abfc09a4f8b2c88d2cedf106e57b0346696ef5c14d5b25357bf5ef3ce8ce54d3fd0e21db1a82faa71d165fdd455d3894fd94
|
7
|
+
data.tar.gz: 6fd4d6def08f81fc1b72e61f841c9f632b17a6a6c469e877cdd3e23170848bfef0692ab3b4d125982a22608b160747ec5ea1fad8a546a18556f4e95f10fe09c4
|
data/.rspec
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
2.0.0-p195
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -20,16 +20,319 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
$ gem install emoji-rspec
|
22
22
|
|
23
|
+
If you want to always have it included, add it to the top of your `.rspec` file:
|
24
|
+
|
25
|
+
# .rspec
|
26
|
+
--require emoji-rspec
|
23
27
|
|
24
28
|
## Usage
|
25
29
|
|
26
|
-
|
30
|
+
If not using the `.rspec` file method, you will need to manually include
|
31
|
+
`emoji-rspec` on the command line when you call `rspec`:
|
32
|
+
|
33
|
+
$ rspec --require emoji-rspec --format smiles
|
34
|
+
|
35
|
+
## Formatters
|
36
|
+
|
37
|
+
### [Adventure Time](http://en.wikipedia.org/wiki/Adventure_Time)
|
38
|
+
|
39
|
+

|
40
|
+
|
41
|
+
_**WARNING**: This is crazy, but then that's the idea if you've seen the show.
|
42
|
+
You take full responsibility for any insanity caused by this formatter._
|
43
|
+
|
44
|
+
> Pass: :sparkling_heart: :star: :star2: :dizzy: :sparkles: :princess: :person_with_blond_hair: :dog2: :gift_heart:
|
45
|
+
|
46
|
+
> Fail: :imp: :smiling_imp: :anger: :boom: :japanese_ogre: :japanese_goblin: :poop: :dragon_face:
|
47
|
+
|
48
|
+
> Pending: :alien: :iphone: :pill: :game_die: :school_satchel: :penguin: :flashlight: :space_invader:
|
49
|
+
|
50
|
+
This can be used with the following `--format` names:
|
51
|
+
|
52
|
+
* `adventure`
|
53
|
+
* `adventure_time`
|
54
|
+
* `adventuretime`
|
55
|
+
* `EmojiTestLove::AdventureTimeFormatter`
|
56
|
+
|
57
|
+
### Aggressive Thumbs
|
58
|
+
|
59
|
+
> Pass: :ok_hand:
|
60
|
+
|
61
|
+
> Fail: :facepunch:
|
62
|
+
|
63
|
+
> Pending: :fist:
|
64
|
+
|
65
|
+
This can be used with the following `--format` names:
|
66
|
+
|
67
|
+
* `aggressive_thumbs`
|
68
|
+
* `aggressivethumbs`
|
69
|
+
* `EmojiTestLove::AggressiveThumbsFormatter`
|
70
|
+
|
71
|
+
### Books
|
72
|
+
|
73
|
+
> Pass: :green_book:
|
74
|
+
|
75
|
+
> Fail: :closed_book:
|
76
|
+
|
77
|
+
> Pending: :orange_book:
|
78
|
+
|
79
|
+
This can be used with the following `--format` names:
|
80
|
+
|
81
|
+
* `books`
|
82
|
+
* `reading_rainbow`
|
83
|
+
* `EmojiTestLove::BooksFormatter`
|
84
|
+
|
85
|
+
### Celebrate
|
86
|
+
|
87
|
+
Similar to [Kanpai](#kanpai) and [Drinking Game](#drinking-game). Here you get
|
88
|
+
to celebrate your hard work when your tests pass. Have a :beer: and cheers with
|
89
|
+
friends :beers:.
|
90
|
+
|
91
|
+
> Pass: :beers: _(cheers with friends / pair programmer)_
|
92
|
+
|
93
|
+
> Fail: :coffee: _(oops maybe too many :beer:, have some coffee)_
|
94
|
+
|
95
|
+
> Pending: :pizza: _(still work to do, have some nom noms)_
|
96
|
+
|
97
|
+
This can be used with the following `--format` names:
|
98
|
+
|
99
|
+
* `celebrate`
|
100
|
+
* `celebration`
|
101
|
+
* `cheers`
|
102
|
+
* `EmojiTestLove::CelebrateFormatter`
|
103
|
+
|
104
|
+
### Drinking Game
|
105
|
+
|
106
|
+
_See also [Celebrate](#celebrate) and [Kanpai](#kanpai)_
|
107
|
+
|
108
|
+
Ever have that late night coding session? Now you can do it in style.
|
109
|
+
|
110
|
+
This is the one time that we do not advise you write failing tests first!
|
111
|
+
|
112
|
+
Also we advise that you turn on fail fast during these sessions:
|
113
|
+
|
114
|
+
```ruby
|
115
|
+
RSpec.configure{ |c| c.fail_fast = true }
|
116
|
+
```
|
117
|
+
|
118
|
+
Or if you prefer the command line persuasion: `--fail-fast`
|
119
|
+
|
120
|
+
Now without further delay
|
121
|
+
|
122
|
+
> Pass: :coffee:
|
123
|
+
|
124
|
+
> Fail: :cocktail: _(gulp of a mixed drink or a shot)_
|
125
|
+
|
126
|
+
> Pending: :beer: _(gulp of beer)_
|
127
|
+
|
128
|
+
|
129
|
+
This can be used with the following `--format` names:
|
130
|
+
|
131
|
+
* `drinking`
|
132
|
+
* `drinking_game`
|
133
|
+
* `drinkingame`
|
134
|
+
* `EmojiTestLove::DrinkingGameFormatter`
|
135
|
+
|
136
|
+
If coffee isn't your thing, there is a tea version too.
|
137
|
+
|
138
|
+
> Pass: :tea:
|
139
|
+
|
140
|
+
> Fail: :cocktail: _(gulp of a mixed drink or a shot)_
|
141
|
+
|
142
|
+
> Pending: :beer: _(gulp of beer)_
|
143
|
+
|
144
|
+
This can be used with the following `--format` names:
|
145
|
+
|
146
|
+
* `drinking_tea`
|
147
|
+
* `drinkingtea`
|
148
|
+
* `drinking_game_tea`
|
149
|
+
* `drinkinggametea`
|
150
|
+
* `EmojiTestLove::DrinkingGameTeaFormatter`
|
151
|
+
|
152
|
+
### Fruit
|
153
|
+
|
154
|
+
> Pass: :green_apple:
|
155
|
+
|
156
|
+
> Fail: :tomato:
|
157
|
+
|
158
|
+
> Pending: :lemon:
|
159
|
+
|
160
|
+
This can be used with the following `--format` names:
|
161
|
+
|
162
|
+
* `apples`
|
163
|
+
* `fruit`
|
164
|
+
* `EmojiTestLove::FruitFormatter`
|
165
|
+
|
166
|
+
### [Kanpai](http://en.wikipedia.org/wiki/Toast_%28honor%29)
|
167
|
+
|
168
|
+
Similar to [Celebrate](#celebrate) and [Drinking Game](#drinking-game). Here
|
169
|
+
you get to celebrate your hard work when your tests pass. So lift some :sake:
|
170
|
+
and [_'Kanpai!'_](http://en.wikipedia.org/wiki/Toast_%28honor%29).
|
171
|
+
|
172
|
+
> Pass: :sake: _("Kanpai!" with friends / pair programmer)_
|
173
|
+
|
174
|
+
> Fail: :tea: _(oops maybe too much :sake:, have some green tea)_
|
175
|
+
|
176
|
+
> Pending: :sushi: _(still work to do, have some nom noms)_
|
177
|
+
|
178
|
+
This can be used with the following `--format` names:
|
179
|
+
|
180
|
+
* `kanpai`
|
181
|
+
* `乾杯`
|
182
|
+
* `EmojiTestLove::KanpaiFormatter`
|
183
|
+
|
184
|
+
### Life Hearts
|
185
|
+
|
186
|
+
> Pass: :green_heart:
|
27
187
|
|
28
|
-
|
188
|
+
> Fail: :broken_heart:
|
29
189
|
|
30
|
-
|
190
|
+
> Pending: :yellow_heart:
|
31
191
|
|
32
|
-
|
192
|
+
This can be used with the following `--format` names:
|
193
|
+
|
194
|
+
* `hearts`
|
195
|
+
* `life`
|
196
|
+
* `life_hearts`
|
197
|
+
* `lifehearts`
|
198
|
+
* `EmojiTestLove::LifeHeartsFormatter`
|
199
|
+
|
200
|
+
### Lucky
|
201
|
+
|
202
|
+
> Pass: :four_leaf_clover:
|
203
|
+
|
204
|
+
> Fail: :mushroom:
|
205
|
+
|
206
|
+
> Pending: :chestnut:
|
207
|
+
|
208
|
+
This can be used with the following `--format` names:
|
209
|
+
|
210
|
+
* `lucky`
|
211
|
+
* `EmojiTestLove::LuckyFormatter`
|
212
|
+
|
213
|
+
### [Omkase](http://en.wikipedia.org/wiki/Omakase)
|
214
|
+
|
215
|
+
I wish Apple had more emoji to make this one a bit more interesting.
|
216
|
+
|
217
|
+
> Pass: :dango:
|
218
|
+
|
219
|
+
> Fail: :rice_cracker:
|
220
|
+
|
221
|
+
> Pending: :fish_cake:
|
222
|
+
|
223
|
+
This can be used with the following `--format` names:
|
224
|
+
|
225
|
+
* `omkase`
|
226
|
+
* `お任せ`
|
227
|
+
* `EmojiTestLove::OmkaseFormatter`
|
228
|
+
|
229
|
+
### Smile Dip
|
230
|
+
|
231
|
+
> Pass: :lollipop:
|
232
|
+
|
233
|
+
> Fail: :ghost:
|
234
|
+
|
235
|
+
> Pending: :dolphin: _([aoshima](http://gravityfalls.wikia.com/wiki/Aoshima))_
|
236
|
+
>
|
237
|
+
> 
|
238
|
+
|
239
|
+
This can be used with the following `--format` names:
|
240
|
+
|
241
|
+
* `smile_dip`
|
242
|
+
* `smiledip`
|
243
|
+
* `fun_dip`
|
244
|
+
* `fundip`
|
245
|
+
* [`aoshima`](http://gravityfalls.wikia.com/wiki/Aoshima)
|
246
|
+
* `EmojiTestLove::SmileDipFormatter`
|
247
|
+
|
248
|
+
[](http://youtu.be/jngqI1la27o)
|
249
|
+
|
250
|
+
### Smiles
|
251
|
+
|
252
|
+
> Pass: :blush:
|
253
|
+
|
254
|
+
> Fail: :rage:
|
255
|
+
|
256
|
+
> Pending: :grimacing:
|
257
|
+
|
258
|
+
This can be used with the following `--format` names:
|
259
|
+
|
260
|
+
* `smiles`
|
261
|
+
* `EmojiTestLove::SmileyFacesFormatter`
|
262
|
+
|
263
|
+
### Sunshine
|
264
|
+
|
265
|
+
> Pass: :sunny:
|
266
|
+
|
267
|
+
> Fail: :umbrella:
|
268
|
+
|
269
|
+
> Pending: :cloud:
|
270
|
+
|
271
|
+
This can be used with the following `--format` names:
|
272
|
+
|
273
|
+
* `sunshine`
|
274
|
+
* `sunny`
|
275
|
+
* `EmojiTestLove::SunshineFormatter`
|
276
|
+
|
277
|
+
### Turtles
|
278
|
+
|
279
|
+
> Pass: :turtle:
|
280
|
+
|
281
|
+
> Fail: :beetle:
|
282
|
+
|
283
|
+
> Pending: :snail:
|
284
|
+
|
285
|
+
This can be used with the following `--format` names:
|
286
|
+
|
287
|
+
* `turtles`
|
288
|
+
* [`turtles_all_the_way_down`](http://en.wikipedia.org/wiki/Turtles_all_the_way_down)
|
289
|
+
* `all_the_way_down`
|
290
|
+
* `EmojiTestLove::TurtlesFormatter`
|
291
|
+
|
292
|
+
### Thumbs
|
293
|
+
|
294
|
+
> Pass: :thumbsup:
|
295
|
+
|
296
|
+
> Fail: :thumbsdown:
|
297
|
+
|
298
|
+
> Pending: :hand:
|
299
|
+
|
300
|
+
This can be used with the following `--format` names:
|
301
|
+
|
302
|
+
* `thumbs`
|
303
|
+
* `EmojiTestLove::ThumbsFormatter`
|
304
|
+
|
305
|
+
### [Waddles](http://gravityfalls.wikia.com/wiki/Waddles)
|
306
|
+
|
307
|
+

|
308
|
+
|
309
|
+
> Pass: :pig:
|
310
|
+
|
311
|
+
> Fail: :bug:
|
312
|
+
|
313
|
+
> Pending: :seedling:
|
314
|
+
|
315
|
+
This can be used with the following `--format` names:
|
316
|
+
|
317
|
+
* `waddles`
|
318
|
+
* `EmojiTestLove::WaddlesFormatter`
|
319
|
+
|
320
|
+
[](http://youtu.be/0RemaiBFMSY)
|
321
|
+
|
322
|
+
### Zen Smiles
|
323
|
+
|
324
|
+
> Pass: :expressionless:
|
325
|
+
|
326
|
+
> Fail: :disappointed:
|
327
|
+
|
328
|
+
> Pending: :pensive:
|
329
|
+
|
330
|
+
This can be used with the following `--format` names:
|
331
|
+
|
332
|
+
* `zen`
|
333
|
+
* `zen_smiles`
|
334
|
+
* `zensmiles`
|
335
|
+
* `EmojiTestLove::ZenSmilesFormatter`
|
33
336
|
|
34
337
|
## Bugs, Issues, and Suggestions
|
35
338
|
|
@@ -43,6 +346,19 @@ Please submit them here https://github.com/cupakromer/emoji-rspec/issues
|
|
43
346
|
4. Push to the branch (`git push origin my-new-feature`)
|
44
347
|
5. Create new Pull Request
|
45
348
|
|
349
|
+
## Versions
|
350
|
+
|
351
|
+
### 1.x
|
352
|
+
|
353
|
+
The current main release. Full support for 2.0.0, with some backwards support
|
354
|
+
for 1.9.2 and 1.9.3.
|
355
|
+
|
356
|
+
### 0.x
|
357
|
+
|
358
|
+
This has reached end of life. Further improvements will only be on the 1.x line.
|
359
|
+
Pull Requests will be welcome on this branch, but new formatters will not be
|
360
|
+
added. If you submit a PR for this, please maintain 1.8.7 support.
|
361
|
+
|
46
362
|
## Copyright / License
|
47
363
|
|
48
364
|
Copyright (c) 2012 Aaron Kromer, released under the MIT License.
|
data/Rakefile
CHANGED
data/emoji-rspec.gemspec
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require '
|
4
|
+
require 'emoji_test_love/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |gem|
|
7
7
|
gem.name = "emoji-rspec"
|
8
|
-
gem.version =
|
8
|
+
gem.version = EmojiTestLove::VERSION
|
9
9
|
gem.authors = ["Aaron Kromer"]
|
10
10
|
gem.description = %q{Custom formatters for RSpec tests.}
|
11
11
|
gem.summary = %q{Emoji RSpec Formatters}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# to run this, just do
|
2
|
+
# rspec -r emoji_test_love/rspec examples/show_some_emoji.rb --format EmojiTestLove::SmileyFacesFormatter
|
3
|
+
describe 'some tests to show off the magic!' do
|
4
|
+
# generate many passes!
|
5
|
+
50.times do |i|
|
6
|
+
it "passes with #{i}" do
|
7
|
+
100.should == 100
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
# generate some failures!
|
12
|
+
2.times do |i|
|
13
|
+
it "fails, since #{i} is not #{i + 1}" do
|
14
|
+
i.should == i + 1
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'skips things!!' do
|
19
|
+
pending "don't care!"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
|
data/lib/emoji-rspec.rb
CHANGED
File without changes
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module EmojiTestLove
|
2
|
+
class AdventureTime
|
3
|
+
PASS_EMOJI = [
|
4
|
+
"\u{1f496} ",
|
5
|
+
"\u{1f31f} ",
|
6
|
+
"\u{2728} ",
|
7
|
+
"\u{1f4ab} ",
|
8
|
+
"\u{1f478} ",
|
9
|
+
"\u{1f471} ",
|
10
|
+
"\u{1f415} ",
|
11
|
+
"\u{1f49d} ",
|
12
|
+
"\u{2b50} ",
|
13
|
+
]
|
14
|
+
|
15
|
+
FAIL_EMOJI = [
|
16
|
+
"\u{1f608} ",
|
17
|
+
"\u{1f47f} ",
|
18
|
+
"\u{1f4a5} ",
|
19
|
+
"\u{1f4a2} ",
|
20
|
+
"\u{1f479} ",
|
21
|
+
"\u{1f47a} ",
|
22
|
+
"\u{1f4a9} ",
|
23
|
+
"\u{1f432} ",
|
24
|
+
]
|
25
|
+
|
26
|
+
PEND_EMOJI = [
|
27
|
+
"\u{1f47d} ",
|
28
|
+
"\u{1f48a} ",
|
29
|
+
"\u{1f427} ",
|
30
|
+
"\u{1f3b2} ",
|
31
|
+
"\u{1f47e} ",
|
32
|
+
"\u{1f392} ",
|
33
|
+
"\u{1f4f1} ",
|
34
|
+
"\u{1f526} ",
|
35
|
+
]
|
36
|
+
|
37
|
+
def passed_display
|
38
|
+
PASS_EMOJI.sample
|
39
|
+
end
|
40
|
+
|
41
|
+
def failed_display
|
42
|
+
FAIL_EMOJI.sample
|
43
|
+
end
|
44
|
+
|
45
|
+
def pending_display
|
46
|
+
PEND_EMOJI.sample
|
47
|
+
end
|
48
|
+
|
49
|
+
def names
|
50
|
+
['adventure', 'adventure_time', 'adventuretime']
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|