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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c7d6a54210e4660c8e760d20e5f85d594df0e83
4
- data.tar.gz: e8292c282c979c5aa30ef8c12dd98e254765a192
3
+ metadata.gz: 96536d6c2a867a9c5b529617dc77dae7116260f9
4
+ data.tar.gz: d4b4c8eb31aa8acf82e9c4168b257aa809cdbe95
5
5
  SHA512:
6
- metadata.gz: 08b9482f29b8451ad63da9342ebdc1079a929073d2dd0f9235642b92d40b220710af57489e4ba30758a94ffd4c8f9f96dae177ea5cc3314540aa92246182bf6d
7
- data.tar.gz: 177c223f8ed17fb2face0c67b1ca106780e6a947d1f35a3069bc698b1e7f11d8f682690d9d45b8b008702cd5e3a372814cf7abf127da20f80218c84083c00ef9
6
+ metadata.gz: dcf717c9763e6f17c6d5aa7649e70fdab32858fc909f8916a7a9a26dd6cb51ec5da739be759ef2f299f0c9a9eca9e4e8aeadcd239e1928c0006d5981c1e03054
7
+ data.tar.gz: 9db3be6caec7add9777241dc1e26919fe088056136d8ee342bd1d66f4e67bc091f32f2c72c2f84bbbf46a464f70668e15069b935ee55d0ca7d1b72db3db01ed6
checksums.yaml.gz.sig CHANGED
@@ -1 +1 @@
1
- jTz=p���_S�l����{����(��y�!�=�G�1%�!z����S��Y|�0��}SzlѮu���G`x��)L|,!��@JQ��5X@��ЋNz��B9�0�K�U�����?J�7!G�i������dct�� V��&��D�Xv g��F� ����3Pw�捐����I����#�3
1
+ 2 ����KkP k7n�<�:@ȥ��(ڱ�jQV>�n'�y��E��1���s���MWE�&��sJ4�ܥ���m��ƒG�`xH��傤W�gCc��ao��⟕L)ROWȖ�J�p ����k{�����
data.tar.gz.sig CHANGED
@@ -1,2 +1 @@
1
- MX�4�����18l��:"5��Χ#B�I�����Ί0�JJ^�iJ�]�=��:|ξY,ʀY/h�9��w��2�(z��"���t
2
- ����4���
1
+ Dz=d�'9��4��:����w�v,�'��J%�]o���IܩI�%N�^O®=��AQ]���-�a��j׈ya�#�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/cyril/spectus.rb.svg?branch=master)](https://travis-ci.org/cyril/spectus.rb)
4
- [![Coverage Status](http://img.shields.io/coveralls/cyril/spectus.rb.svg?branch=master)](https://coveralls.io/r/cyril/spectus.rb)
5
- [![Dependency Status](https://gemnasium.com/cyril/spectus.rb.svg)](https://gemnasium.com/cyril/spectus.rb)
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/cyril/spectus.rb.svg?branch=master)](http://inch-ci.org/github/cyril/spectus.rb)
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
- > An expectation library with some built-in matchers for Ruby.
10
+ > Expectation library with some built-in matchers for Ruby.
12
11
 
13
12
  ## Contact
14
13
 
15
- * Home page: https://github.com/cyril/spectus.rb
16
- * Bugs/issues: https://github.com/cyril/spectus.rb/issues
17
- * Support: https://stackoverflow.com/questions/tagged/spectus-ruby
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 ~200 lines of fast and KISS code.
44
+ * It's 194 lines of fast and KISS code.
46
45
  * Atomic state transitions, immutable objects, thread-safe.
47
- * Generic and consistent DSL for assertions.
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 warn 'WAT?'
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/cyril/spectus.rb/fork)
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.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
- # require 'spectus'
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 warn 'WAT?'
19
+ else abort 'WAT?'
21
20
  end
data/lib/spectus/dsl.rb CHANGED
@@ -10,7 +10,7 @@ module Spectus
10
10
  # @api public
11
11
  #
12
12
  # @example Duck example
13
- # YARD.parse('example/duck/*.rb')
13
+ # expect { 42 }.to equal: 42 # => true
14
14
  #
15
15
  # @return [ExpectationTarget] the expectation target.
16
16
  def expect &input
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{An expectation library with some matchers for Ruby.}
8
- spec.homepage = 'https://github.com/cyril/spectus.rb'
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")
@@ -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.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-09-25 00:00:00.000000000 Z
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: An expectation library with some matchers for Ruby.
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/cyril/spectus.rb
149
+ homepage: https://github.com/fixrb/spectus
150
150
  licenses:
151
151
  - MIT
152
152
  metadata: {}
metadata.gz.sig CHANGED
Binary file