spectus 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +1 -1
- data.tar.gz.sig +1 -2
- data/README.md +16 -13
- data/VERSION.semver +1 -1
- data/example/duck/test.rb +2 -3
- data/lib/spectus/dsl.rb +1 -1
- data/spectus.gemspec +2 -2
- data/test/support/presenter.rb +8 -0
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96536d6c2a867a9c5b529617dc77dae7116260f9
|
4
|
+
data.tar.gz: d4b4c8eb31aa8acf82e9c4168b257aa809cdbe95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcf717c9763e6f17c6d5aa7649e70fdab32858fc909f8916a7a9a26dd6cb51ec5da739be759ef2f299f0c9a9eca9e4e8aeadcd239e1928c0006d5981c1e03054
|
7
|
+
data.tar.gz: 9db3be6caec7add9777241dc1e26919fe088056136d8ee342bd1d66f4e67bc091f32f2c72c2f84bbbf46a464f70668e15069b935ee55d0ca7d1b72db3db01ed6
|
checksums.yaml.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
�
|
1
|
+
2 ����KkPk�7�n�<�:@ȥ��(ڱ�jQV>�n'�y��E��1���s���M�WE�&��sJ�4�ܥ���m��ƒG�`xH��傤W�gCc��ao��⟕L)ROWȖ�J�p ����k�{�����
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
����4���
|
1
|
+
Dz=d�'9��4��:����w�v,�'��J%�]o���IܩI�%N�^O®=��A�Q]���-�a��jya�#�h+8O�%��?�A)h�c*�z&(G���F
|
data/README.md
CHANGED
@@ -1,20 +1,19 @@
|
|
1
1
|
# Spectus
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/
|
4
|
-
[![Coverage Status](http://img.shields.io/coveralls/
|
5
|
-
[![Dependency Status](https://gemnasium.com/
|
3
|
+
[![Build Status](https://travis-ci.org/fixrb/spectus.svg?branch=master)](https://travis-ci.org/fixrb/spectus)
|
4
|
+
[![Coverage Status](http://img.shields.io/coveralls/fixrb/spectus.svg?branch=master)](https://coveralls.io/r/fixrb/spectus)
|
5
|
+
[![Dependency Status](https://gemnasium.com/fixrb/spectus.svg)](https://gemnasium.com/fixrb/spectus)
|
6
6
|
[![Gem Version](http://img.shields.io/gem/v/spectus.svg)](https://rubygems.org/gems/spectus)
|
7
|
-
[![Inline docs](http://inch-ci.org/github/
|
7
|
+
[![Inline docs](http://inch-ci.org/github/fixrb/spectus.svg?branch=master)](http://inch-ci.org/github/fixrb/spectus)
|
8
8
|
[![Documentation](http://img.shields.io/:yard-docs-38c800.svg)](http://rubydoc.info/gems/spectus/frames)
|
9
|
-
[![License](http://img.shields.io/:license-MIT-38c800.svg)](http://cyril.mit-license.org/)
|
10
9
|
|
11
|
-
>
|
10
|
+
> Expectation library with some built-in matchers for Ruby.
|
12
11
|
|
13
12
|
## Contact
|
14
13
|
|
15
|
-
* Home page: https://github.com/
|
16
|
-
* Bugs/issues: https://github.com/
|
17
|
-
* Support: https://stackoverflow.com/questions/tagged/spectus
|
14
|
+
* Home page: https://github.com/fixrb/spectus
|
15
|
+
* Bugs/issues: https://github.com/fixrb/spectus/issues
|
16
|
+
* Support: https://stackoverflow.com/questions/tagged/spectus
|
18
17
|
|
19
18
|
## Rubies
|
20
19
|
|
@@ -42,9 +41,9 @@ $ gem install spectus
|
|
42
41
|
|
43
42
|
## Why would I want this library?
|
44
43
|
|
45
|
-
* It's
|
44
|
+
* It's 194 lines of fast and KISS code.
|
46
45
|
* Atomic state transitions, immutable objects, thread-safe.
|
47
|
-
*
|
46
|
+
* Provides a generic and consistent DSL for assertions.
|
48
47
|
|
49
48
|
## API
|
50
49
|
|
@@ -92,7 +91,7 @@ case (expectation_1 == true &&
|
|
92
91
|
expectation_3 == true &&
|
93
92
|
expectation_4 == true)
|
94
93
|
when true then puts "I call that #{@bird} a duck."
|
95
|
-
else
|
94
|
+
else abort 'WAT?'
|
96
95
|
end
|
97
96
|
```
|
98
97
|
|
@@ -231,9 +230,13 @@ module Spectus
|
|
231
230
|
end
|
232
231
|
```
|
233
232
|
|
233
|
+
## Presentations
|
234
|
+
|
235
|
+
* [こんばんは、条件やビヘイビアテスト](https://speakerdeck.com/cyril/konbanha-tiao-jian-yabiheibiatesuto)
|
236
|
+
|
234
237
|
## Contributing
|
235
238
|
|
236
|
-
1. [Fork it](https://github.com/
|
239
|
+
1. [Fork it](https://github.com/fixrb/spectus/fork)
|
237
240
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
238
241
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
239
242
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/VERSION.semver
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
data/example/duck/test.rb
CHANGED
@@ -2,8 +2,7 @@
|
|
2
2
|
|
3
3
|
require_relative 'app'
|
4
4
|
|
5
|
-
|
6
|
-
require_relative '../../lib/spectus'
|
5
|
+
require 'spectus'
|
7
6
|
|
8
7
|
extend Spectus::DSL
|
9
8
|
|
@@ -17,5 +16,5 @@ case (expectation_1 == true &&
|
|
17
16
|
expectation_3 == true &&
|
18
17
|
expectation_4 == true)
|
19
18
|
when true then puts "I call that #{@app} a duck."
|
20
|
-
else
|
19
|
+
else abort 'WAT?'
|
21
20
|
end
|
data/lib/spectus/dsl.rb
CHANGED
data/spectus.gemspec
CHANGED
@@ -4,8 +4,8 @@ Gem::Specification.new do |spec|
|
|
4
4
|
spec.authors = ['Cyril Wack']
|
5
5
|
spec.email = ['cyril@sashite.com']
|
6
6
|
spec.summary = %q{Expectation library.}
|
7
|
-
spec.description = %q{
|
8
|
-
spec.homepage = 'https://github.com/
|
7
|
+
spec.description = %q{Expectation library with some matchers for Ruby.}
|
8
|
+
spec.homepage = 'https://github.com/fixrb/spectus'
|
9
9
|
spec.license = 'MIT'
|
10
10
|
|
11
11
|
spec.files = `git ls-files -z`.split("\x0")
|
data/test/support/presenter.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
@failures = 0
|
2
|
+
|
1
3
|
def subject title = nil, &block
|
2
4
|
if block
|
3
5
|
@subject = block.call
|
@@ -16,8 +18,14 @@ def it describe, &expectation
|
|
16
18
|
when true
|
17
19
|
puts "\e[32m.\e[0m"
|
18
20
|
when false
|
21
|
+
@failures += 1
|
19
22
|
warn "\e[31mF\e[0m"
|
20
23
|
else
|
24
|
+
@failures += 1
|
21
25
|
fail result
|
22
26
|
end
|
23
27
|
end
|
28
|
+
|
29
|
+
at_exit do
|
30
|
+
abort("\e[31mFailure.\e[0m") unless @failures.zero?
|
31
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spectus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril Wack
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
zeYBFLJQAl0AQPaGujsG5tssIabiNy1ryydKAjWkNDxqLgvtwST3L0Qr9UQFQgoA
|
31
31
|
O2Rl8PjSD+2P9XE7T2x1xQ==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2014-
|
33
|
+
date: 2014-10-13 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: bundler
|
@@ -88,7 +88,7 @@ dependencies:
|
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0.7'
|
91
|
-
description:
|
91
|
+
description: Expectation library with some matchers for Ruby.
|
92
92
|
email:
|
93
93
|
- cyril@sashite.com
|
94
94
|
executables: []
|
@@ -146,7 +146,7 @@ files:
|
|
146
146
|
- test/support/coverage.rb
|
147
147
|
- test/support/env.rb
|
148
148
|
- test/support/presenter.rb
|
149
|
-
homepage: https://github.com/
|
149
|
+
homepage: https://github.com/fixrb/spectus
|
150
150
|
licenses:
|
151
151
|
- MIT
|
152
152
|
metadata: {}
|
metadata.gz.sig
CHANGED
Binary file
|