fix-expect 0.3.5 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +1 -1
- data/README.md +108 -74
- data/lib/fix/expect.rb +0 -68
- data/lib/fix/it.rb +21 -14
- data/lib/spectus/expectation_target.rb +12 -0
- metadata +45 -33
- data/.gitignore +0 -10
- data/.rubocop.yml +0 -1
- data/.rubocop_todo.yml +0 -19
- data/.travis.yml +0 -28
- data/.yardopts +0 -1
- data/CODE_OF_CONDUCT.md +0 -13
- data/Gemfile +0 -5
- data/Rakefile +0 -22
- data/VERSION.semver +0 -1
- data/bin/console +0 -8
- data/bin/setup +0 -6
- data/checksum/fix-expect-0.3.0.gem.sha512 +0 -1
- data/checksum/fix-expect-0.3.2.gem.sha512 +0 -1
- data/checksum/fix-expect-0.3.3.gem.sha512 +0 -1
- data/checksum/fix-expect-0.3.4.gem.sha512 +0 -1
- data/fix-expect.gemspec +0 -27
- data/pkg_checksum +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd3ab66acef53a762a8fde029bfd8c341484a80e1fe48131cbb7537c6b73d9e0
|
4
|
+
data.tar.gz: ba1a4185b47239596e28683a8f44ee9a9331d96694b0aa35465ca64fdf2b0f9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcc7425d008c771ed21de78e1d5f1426ef8ee3d09a2042ab82673a75f143db6fe1464e107c0baa6c9c3d450d506f48b4de3a3255cbd9331dfbf1bd1a029cdf22
|
7
|
+
data.tar.gz: 1d3d94a78246c515e2744b693574d7338c3b96fbe82e1ff4c41782930591ee3523d488b49e39690aa766ce91b69a5ee143024dc973755fe24d0f8cb52af2eaf2
|
data/LICENSE.md
CHANGED
data/README.md
CHANGED
@@ -1,25 +1,13 @@
|
|
1
1
|
# Fix::Expect
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/fixrb/fix-expect.svg?branch=master)][travis]
|
3
|
+
[![Build Status](https://api.travis-ci.org/fixrb/fix-expect.svg?branch=master)][travis]
|
4
4
|
[![Code Climate](https://codeclimate.com/github/fixrb/fix-expect/badges/gpa.svg)][codeclimate]
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/fix-expect.svg)][gem]
|
6
|
-
[![Inline docs](
|
7
|
-
[![Documentation](
|
6
|
+
[![Inline docs](https://inch-ci.org/github/fixrb/fix-expect.svg?branch=master)][inchpages]
|
7
|
+
[![Documentation](https://img.shields.io/:yard-docs-38c800.svg)][rubydoc]
|
8
8
|
|
9
9
|
> Provides the `expect` syntax.
|
10
10
|
|
11
|
-
## Contact
|
12
|
-
|
13
|
-
* Home page: https://github.com/fixrb/fix-expect
|
14
|
-
* Bugs/issues: https://github.com/fixrb/fix-expect/issues
|
15
|
-
* Support: https://stackoverflow.com/questions/tagged/fixrb
|
16
|
-
|
17
|
-
## Rubies
|
18
|
-
|
19
|
-
* [MRI](https://www.ruby-lang.org/)
|
20
|
-
* [Rubinius](http://rubini.us/)
|
21
|
-
* [JRuby](http://jruby.org/)
|
22
|
-
|
23
11
|
## Installation
|
24
12
|
|
25
13
|
Add this line to your application's Gemfile:
|
@@ -38,101 +26,147 @@ Or install it yourself as:
|
|
38
26
|
|
39
27
|
## Usage
|
40
28
|
|
41
|
-
|
29
|
+
### The `expect` method
|
30
|
+
|
31
|
+
__Fix::Expect__ lets you express expected outcomes on an object, thanks to [Spectus](https://rubygems.org/gems/spectus)'s `MUST` and `MUST_NOT` requirement levels.
|
32
|
+
|
33
|
+
An **absolute requirement** example:
|
42
34
|
|
43
35
|
```ruby
|
44
|
-
|
36
|
+
Fix do
|
37
|
+
it { expect(-42.abs).to equal 42 }
|
38
|
+
end
|
45
39
|
```
|
46
40
|
|
47
|
-
|
41
|
+
> (irb):2: Success: expected to equal 42.
|
42
|
+
|
43
|
+
An **absolute prohibition** example:
|
48
44
|
|
49
45
|
```ruby
|
50
|
-
Fix
|
51
|
-
it {
|
52
|
-
it { expect(subject.class).to equal Fixnum }
|
46
|
+
Fix do
|
47
|
+
it { expect(-42).not_to equal 42 }
|
53
48
|
end
|
54
|
-
|
55
|
-
# ..
|
56
|
-
#
|
57
|
-
# Ran 2 tests in 0.000327 seconds
|
58
|
-
# 100% compliant - 0 infos, 0 failures, 0 errors
|
59
49
|
```
|
60
50
|
|
61
|
-
|
51
|
+
> (irb):5: Success: expected -42 not to equal 42.
|
62
52
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
53
|
+
Thus, rather than inferring the actual value (which is `41.next`) from the context
|
54
|
+
and calculating its value (which is `42`),
|
55
|
+
|
56
|
+
rather than letting Fix's default behavior define and compute `41.next` as the actual value to challenge,
|
57
|
+
the `expect` method short circuit it with its argument.
|
58
|
+
|
59
|
+
These 2 examples are equivalent:
|
68
60
|
|
69
|
-
|
70
|
-
|
61
|
+
```ruby
|
62
|
+
Fix 41 do
|
63
|
+
on :next do
|
64
|
+
it { MUST equal 42 }
|
65
|
+
it { expect(41.next).to equal 42 }
|
71
66
|
end
|
67
|
+
|
68
|
+
it { MUST equal 41 }
|
69
|
+
it { expect(41.next).to equal 42 }
|
72
70
|
end
|
71
|
+
```
|
72
|
+
|
73
|
+
> (irb):9: Success: expected to equal 42.
|
74
|
+
> (irb):10: Success: expected to equal 42.
|
75
|
+
> (irb):13: Success: expected to equal 41.
|
76
|
+
> (irb):14: Success: expected to equal 42.
|
73
77
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
+
The block syntax is also allowed:
|
79
|
+
|
80
|
+
```ruby
|
81
|
+
Fix do
|
82
|
+
it { expect { -42.abs }.to equal 42 }
|
83
|
+
end
|
78
84
|
```
|
79
85
|
|
80
|
-
|
86
|
+
> (irb):2: Success: expected to equal 42.
|
87
|
+
|
88
|
+
```ruby
|
89
|
+
Fix do
|
90
|
+
it { expect { 4 / 0 }.to raise_exception ZeroDivisionError }
|
91
|
+
end
|
92
|
+
```
|
93
|
+
|
94
|
+
> (irb):5: Success: divided by 0.
|
95
|
+
|
96
|
+
### The `is_expected` method
|
81
97
|
|
82
|
-
For convenience,
|
98
|
+
For convenience, an `is_expected` method is provided,
|
99
|
+
as an alias of Spectus's [MUST](https://github.com/fixrb/spectus#absolute-requirement):
|
83
100
|
|
84
101
|
```ruby
|
85
|
-
Fix
|
86
|
-
on :
|
87
|
-
# test against the described front object:
|
102
|
+
Fix 41 do
|
103
|
+
on :next do
|
88
104
|
it { is_expected.to equal 42 }
|
89
105
|
end
|
90
106
|
end
|
107
|
+
```
|
108
|
+
|
109
|
+
> (irb):3: Success: expected to equal 42.
|
110
|
+
|
111
|
+
### Code Isolation
|
112
|
+
|
113
|
+
When executing expectations, side-effects may occur.
|
114
|
+
Because they may or may not be desired, each requirement level has 2 versions:
|
91
115
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
116
|
+
* if it is performed with `do`, a test is performed without isolation;
|
117
|
+
* if it is performed with `do!`, a test is performed in isolation.
|
118
|
+
|
119
|
+
Example of test without isolation:
|
120
|
+
|
121
|
+
```ruby
|
122
|
+
greeting = 'Hello, world!'
|
123
|
+
|
124
|
+
Fix do
|
125
|
+
it 'tests without isolation' do
|
126
|
+
expect { greeting.gsub!('world', 'Alice') }.to equal 'Hello, Alice!'
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
greeting # => "Hello, Alice!"
|
96
131
|
```
|
97
132
|
|
98
|
-
|
133
|
+
Example of test in isolation:
|
99
134
|
|
100
|
-
|
101
|
-
|
102
|
-
Although these checksums do not prevent malicious users from tampering with a
|
103
|
-
built Gem they can be used for basic integrity verification purposes.
|
135
|
+
```ruby
|
136
|
+
greeting = 'Hello, world!'
|
104
137
|
|
105
|
-
|
106
|
-
|
138
|
+
Fix do
|
139
|
+
it 'tests with isolation' do
|
140
|
+
expect { greeting.gsub!('world', 'Alice') }.to! equal 'Hello, Alice!'
|
141
|
+
end
|
142
|
+
end
|
107
143
|
|
108
|
-
|
109
|
-
|
144
|
+
greeting # => "Hello, world!"
|
145
|
+
```
|
110
146
|
|
111
|
-
##
|
147
|
+
## Contact
|
112
148
|
|
113
|
-
|
149
|
+
* Source code: https://github.com/fixrb/fix-expect
|
114
150
|
|
115
|
-
##
|
151
|
+
## Versioning
|
116
152
|
|
117
|
-
|
118
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
119
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
120
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
121
|
-
5. Create a new Pull Request
|
153
|
+
__Fix::Expect__ follows [Semantic Versioning 2.0](https://semver.org/).
|
122
154
|
|
123
155
|
## License
|
124
156
|
|
125
|
-
|
126
|
-
|
127
|
-
[gem]: https://rubygems.org/gems/fix-expect
|
128
|
-
[travis]: https://travis-ci.org/fixrb/fix-expect
|
129
|
-
[codeclimate]: https://codeclimate.com/github/fixrb/fix-expect
|
130
|
-
[gemnasium]: https://gemnasium.com/fixrb/fix-expect
|
131
|
-
[inchpages]: http://inch-ci.org/github/fixrb/fix-expect
|
132
|
-
[rubydoc]: http://rubydoc.info/gems/fix-expect/frames
|
157
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
133
158
|
|
134
159
|
***
|
135
160
|
|
136
|
-
|
161
|
+
<p>
|
162
|
+
This project is sponsored by:<br />
|
163
|
+
<a href="https://sashite.com/"><img
|
164
|
+
src="https://github.com/fixrb/fix-expect/raw/master/img/sashite.png"
|
165
|
+
alt="Sashite" /></a>
|
166
|
+
</p>
|
137
167
|
|
138
|
-
[
|
168
|
+
[gem]: https://rubygems.org/gems/fix-expect
|
169
|
+
[travis]: https://travis-ci.org/fixrb/fix-expect
|
170
|
+
[codeclimate]: https://codeclimate.com/github/fixrb/fix-expect
|
171
|
+
[inchpages]: https://inch-ci.org/github/fixrb/fix-expect
|
172
|
+
[rubydoc]: https://rubydoc.info/gems/fix-expect/frames
|
data/lib/fix/expect.rb
CHANGED
@@ -1,71 +1,3 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Namespace for the Fix framework.
|
4
|
-
#
|
5
|
-
# @api public
|
6
|
-
#
|
7
|
-
module Fix
|
8
|
-
# Expect's class.
|
9
|
-
#
|
10
|
-
class Expect
|
11
|
-
# Initialize the expect class.
|
12
|
-
#
|
13
|
-
# @param object [#object_id] The object to test.
|
14
|
-
# @param challenges [Array] A list of challenges.
|
15
|
-
def initialize(object, *challenges)
|
16
|
-
@object = object
|
17
|
-
@challenges = challenges
|
18
|
-
end
|
19
|
-
|
20
|
-
# Evaluate to a positive assertion.
|
21
|
-
#
|
22
|
-
# @param m [#matches?] The matcher.
|
23
|
-
#
|
24
|
-
# @return (see #requirement)
|
25
|
-
def to(m)
|
26
|
-
requirement(m, false).result
|
27
|
-
end
|
28
|
-
|
29
|
-
# Evaluate to a negative assertion.
|
30
|
-
#
|
31
|
-
# @param (see #to)
|
32
|
-
#
|
33
|
-
# @return (see #requirement)
|
34
|
-
def not_to(m)
|
35
|
-
requirement(m, true).result
|
36
|
-
end
|
37
|
-
|
38
|
-
# Evaluate to a positive assertion in isolation.
|
39
|
-
#
|
40
|
-
# @param (see #to)
|
41
|
-
#
|
42
|
-
# @return (see #requirement)
|
43
|
-
def to!(m)
|
44
|
-
requirement(m, false).result(true)
|
45
|
-
end
|
46
|
-
|
47
|
-
# Evaluate to a negative assertion in isolation.
|
48
|
-
#
|
49
|
-
# @param (see #to)
|
50
|
-
#
|
51
|
-
# @return (see #requirement)
|
52
|
-
def not_to!(m)
|
53
|
-
requirement(m, true).result(true)
|
54
|
-
end
|
55
|
-
|
56
|
-
private
|
57
|
-
|
58
|
-
# High requirement level.
|
59
|
-
#
|
60
|
-
# @param m [#matches?] The matcher.
|
61
|
-
# @param negate [Boolean] Evaluate to a negative assertion.
|
62
|
-
#
|
63
|
-
# @return [Spectus::Result::Fail, Spectus::Result::Pass] Report if the spec
|
64
|
-
# pass or fail.
|
65
|
-
def requirement(m, negate)
|
66
|
-
Spectus::RequirementLevel::High.new(m, negate, @object, *@challenges)
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
3
|
require_relative 'it'
|
data/lib/fix/it.rb
CHANGED
@@ -5,25 +5,29 @@ require 'fix'
|
|
5
5
|
# Namespace for the Fix framework.
|
6
6
|
#
|
7
7
|
module Fix
|
8
|
-
# Wraps the target of
|
9
|
-
|
10
|
-
|
11
|
-
# Create a new expection target given an object.
|
8
|
+
# Wraps the target of a Spectus expectation.
|
9
|
+
class Expect < ::Spectus::ExpectationTarget
|
10
|
+
# Create a new expection target
|
12
11
|
#
|
13
|
-
# @param
|
14
|
-
|
15
|
-
|
16
|
-
def expect(object)
|
17
|
-
Expect.new(object, *challenges)
|
12
|
+
# @param callable [#call] The object to test.
|
13
|
+
def initialize(callable)
|
14
|
+
@callable = callable
|
18
15
|
end
|
16
|
+
end
|
19
17
|
|
20
|
-
|
18
|
+
# Wraps the target of a Fix expectation.
|
19
|
+
class It
|
20
|
+
# Create a new expection target given an object.
|
21
21
|
#
|
22
|
-
# @param
|
22
|
+
# @param object [#object_id] An object to test.
|
23
23
|
#
|
24
24
|
# @return [Expect] An expect instance.
|
25
|
-
def
|
26
|
-
|
25
|
+
def expect(object = nil, &block)
|
26
|
+
if block_given?
|
27
|
+
::Fix::Expect.new(block)
|
28
|
+
else
|
29
|
+
::Fix::Expect.new(::Defi.send(:itself).to(object))
|
30
|
+
end
|
27
31
|
end
|
28
32
|
|
29
33
|
# rubocop:disable PredicateName
|
@@ -32,8 +36,11 @@ module Fix
|
|
32
36
|
#
|
33
37
|
# @return [Expect] An expect instance.
|
34
38
|
def is_expected
|
35
|
-
Expect.new(
|
39
|
+
::Fix::Expect.new(callable)
|
36
40
|
end
|
37
41
|
# rubocop:enable PredicateName
|
38
42
|
end
|
39
43
|
end
|
44
|
+
|
45
|
+
# require_relative 'expect' unless defined?(::Fix::Expect)
|
46
|
+
require_relative '../spectus/expectation_target'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fix-expect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril Kato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fix
|
@@ -16,84 +16,112 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 1.0.0.beta3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 1.0.0.beta3
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: spectus
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.1.2
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.1.2
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version: '2.
|
47
|
+
version: '2.1'
|
34
48
|
type: :development
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: '2.
|
54
|
+
version: '2.1'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
61
|
+
version: '13.0'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
68
|
+
version: '13.0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rubocop
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
75
|
+
version: '0.79'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
82
|
+
version: '0.79'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop-performance
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: simplecov
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
72
100
|
requirements:
|
73
101
|
- - "~>"
|
74
102
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0.
|
103
|
+
version: '0.17'
|
76
104
|
type: :development
|
77
105
|
prerelease: false
|
78
106
|
version_requirements: !ruby/object:Gem::Requirement
|
79
107
|
requirements:
|
80
108
|
- - "~>"
|
81
109
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0.
|
110
|
+
version: '0.17'
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
112
|
name: spectus
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
115
|
- - "~>"
|
88
116
|
- !ruby/object:Gem::Version
|
89
|
-
version: '3.
|
117
|
+
version: '3.1'
|
90
118
|
type: :development
|
91
119
|
prerelease: false
|
92
120
|
version_requirements: !ruby/object:Gem::Requirement
|
93
121
|
requirements:
|
94
122
|
- - "~>"
|
95
123
|
- !ruby/object:Gem::Version
|
96
|
-
version: '3.
|
124
|
+
version: '3.1'
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
126
|
name: yard
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,27 +143,11 @@ executables: []
|
|
115
143
|
extensions: []
|
116
144
|
extra_rdoc_files: []
|
117
145
|
files:
|
118
|
-
- ".gitignore"
|
119
|
-
- ".rubocop.yml"
|
120
|
-
- ".rubocop_todo.yml"
|
121
|
-
- ".travis.yml"
|
122
|
-
- ".yardopts"
|
123
|
-
- CODE_OF_CONDUCT.md
|
124
|
-
- Gemfile
|
125
146
|
- LICENSE.md
|
126
147
|
- README.md
|
127
|
-
- Rakefile
|
128
|
-
- VERSION.semver
|
129
|
-
- bin/console
|
130
|
-
- bin/setup
|
131
|
-
- checksum/fix-expect-0.3.0.gem.sha512
|
132
|
-
- checksum/fix-expect-0.3.2.gem.sha512
|
133
|
-
- checksum/fix-expect-0.3.3.gem.sha512
|
134
|
-
- checksum/fix-expect-0.3.4.gem.sha512
|
135
|
-
- fix-expect.gemspec
|
136
148
|
- lib/fix/expect.rb
|
137
149
|
- lib/fix/it.rb
|
138
|
-
-
|
150
|
+
- lib/spectus/expectation_target.rb
|
139
151
|
homepage: https://github.com/fixrb/fix-expect
|
140
152
|
licenses:
|
141
153
|
- MIT
|
@@ -148,14 +160,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
148
160
|
requirements:
|
149
161
|
- - ">="
|
150
162
|
- !ruby/object:Gem::Version
|
151
|
-
version:
|
163
|
+
version: 2.3.0
|
152
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
165
|
requirements:
|
154
166
|
- - ">="
|
155
167
|
- !ruby/object:Gem::Version
|
156
168
|
version: '0'
|
157
169
|
requirements: []
|
158
|
-
rubygems_version: 3.
|
170
|
+
rubygems_version: 3.1.2
|
159
171
|
signing_key:
|
160
172
|
specification_version: 4
|
161
173
|
summary: Provides the expect syntax.
|
data/.gitignore
DELETED
data/.rubocop.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
inherit_from: .rubocop_todo.yml
|
data/.rubocop_todo.yml
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on 2018-08-26 22:47:51 +0200 using RuboCop version 0.58.2.
|
4
|
-
# The point is for the user to remove these configuration records
|
5
|
-
# one by one as the offenses are removed from the code base.
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
8
|
-
|
9
|
-
# Offense count: 5
|
10
|
-
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
11
|
-
# AllowedNames: io, id, to, by, on, in, at, ip
|
12
|
-
Naming/UncommunicativeMethodParamName:
|
13
|
-
Exclude:
|
14
|
-
- 'lib/fix/expect.rb'
|
15
|
-
|
16
|
-
# Offense count: 1
|
17
|
-
Style/MixinUsage:
|
18
|
-
Exclude:
|
19
|
-
- 'test/test_expect.rb'
|
data/.travis.yml
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
sudo: false
|
3
|
-
cache: bundler
|
4
|
-
before_install:
|
5
|
-
- gem install bundler
|
6
|
-
script:
|
7
|
-
- bundle exec rubocop
|
8
|
-
- bundle exec rake test
|
9
|
-
rvm:
|
10
|
-
- 2.3.3
|
11
|
-
- 2.4.0
|
12
|
-
- 2.5.0
|
13
|
-
- 2.6.2
|
14
|
-
- ruby-head
|
15
|
-
- jruby-head
|
16
|
-
- rbx-3
|
17
|
-
matrix:
|
18
|
-
allow_failures:
|
19
|
-
- rvm: ruby-head
|
20
|
-
- rvm: jruby-head
|
21
|
-
- rvm: rbx-3
|
22
|
-
notifications:
|
23
|
-
webhooks:
|
24
|
-
urls:
|
25
|
-
- https://webhooks.gitter.im/e/a44b19cc5cf6db25fa87
|
26
|
-
on_success: change
|
27
|
-
on_failure: always
|
28
|
-
on_start: never
|
data/.yardopts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
- README.md
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# Contributor Code of Conduct
|
2
|
-
|
3
|
-
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
-
|
5
|
-
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
6
|
-
|
7
|
-
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
-
|
9
|
-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
-
|
11
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
-
|
13
|
-
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'bundler/gem_tasks'
|
4
|
-
require 'rake/testtask'
|
5
|
-
require 'rubocop/rake_task'
|
6
|
-
|
7
|
-
RuboCop::RakeTask.new
|
8
|
-
|
9
|
-
Rake::TestTask.new do |t|
|
10
|
-
t.verbose = true
|
11
|
-
t.warning = true
|
12
|
-
end
|
13
|
-
|
14
|
-
namespace :test do
|
15
|
-
task :coverage do
|
16
|
-
ENV['COVERAGE'] = 'true'
|
17
|
-
Rake::Task['test'].invoke
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
task(:doc_stats) { ruby '-S yard stats' }
|
22
|
-
task default: %i[test doc_stats rubocop]
|
data/VERSION.semver
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.3.5
|
data/bin/console
DELETED
data/bin/setup
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
4886cd57a0071431984eda3ac9321dc0b795f9662b3541a8bb9dd43853ef2edc220720fe168aa1e0de395ec0b2c923e408abd4e8ada2bf5e2e8adfd149d4e417
|
@@ -1 +0,0 @@
|
|
1
|
-
95b9fa3855f1e358351a9f830add81d91f78a18e2e295aeb05f272d3da1cb655b0a61c909100c9f8821d21db2fc2abe0404a93b36c04f944b6f9b006de64b5ba
|
@@ -1 +0,0 @@
|
|
1
|
-
a67f8870c7d95880b83b7758b0ffb1f1e30d23beae78cb8200539bf7be06ffa9dd41df74fdd871f85874a138c55bb58a723970df3d5db481892dd203b6930e28
|
@@ -1 +0,0 @@
|
|
1
|
-
84e68c1539a488c111070157e9a1888b79e1b6cef525ff5cda1ce35e68bfda04b4590114fd41d39bf7f3827395a4d6bf47ad746c7c858159c87d2c1a687fea95
|
data/fix-expect.gemspec
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
Gem::Specification.new do |spec|
|
4
|
-
spec.name = 'fix-expect'
|
5
|
-
spec.version = File.read('VERSION.semver').chomp
|
6
|
-
spec.authors = ['Cyril Kato']
|
7
|
-
spec.email = ['contact@cyril.email']
|
8
|
-
|
9
|
-
spec.summary = 'Provides the expect syntax.'
|
10
|
-
spec.description = 'Fix extension gem to provide the expect syntax.'
|
11
|
-
spec.homepage = 'https://github.com/fixrb/fix-expect'
|
12
|
-
spec.license = 'MIT'
|
13
|
-
|
14
|
-
spec.files =
|
15
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^test/}) }
|
16
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
17
|
-
spec.require_paths = ['lib']
|
18
|
-
|
19
|
-
spec.add_dependency 'fix', '~> 0.18.0'
|
20
|
-
|
21
|
-
spec.add_development_dependency 'bundler', '~> 2.0'
|
22
|
-
spec.add_development_dependency 'rake', '~> 12.3'
|
23
|
-
spec.add_development_dependency 'rubocop', '~> 0.67'
|
24
|
-
spec.add_development_dependency 'simplecov', '~> 0.16'
|
25
|
-
spec.add_development_dependency 'spectus', '~> 3.0'
|
26
|
-
spec.add_development_dependency 'yard', '~> 0.9'
|
27
|
-
end
|
data/pkg_checksum
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require 'digest/sha2'
|
5
|
-
|
6
|
-
gemname = 'fix-expect'.to_sym
|
7
|
-
ARGV[0] = File.read('VERSION.semver').chomp if ARGV[0].nil?
|
8
|
-
built_gem_path = "pkg/#{gemname}-#{ARGV[0]}.gem"
|
9
|
-
checksum = Digest::SHA512.new.hexdigest(File.read(built_gem_path))
|
10
|
-
checksum_path = "checksum/#{gemname}-#{ARGV[0]}.gem.sha512"
|
11
|
-
|
12
|
-
File.open(checksum_path, 'w') { |f| f.write("#{checksum}\n") }
|