duck_testing 0.0.1
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/.gitignore +35 -0
- data/.rspec +3 -0
- data/.rubocop.yml +15 -0
- data/.travis.yml +7 -0
- data/.yardopts +4 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +7 -0
- data/Guardfile +19 -0
- data/LICENSE +22 -0
- data/README.md +75 -0
- data/Rakefile +8 -0
- data/duck_testing.gemspec +28 -0
- data/lib/duck_testing.rb +19 -0
- data/lib/duck_testing/errors.rb +4 -0
- data/lib/duck_testing/method_call_data.rb +19 -0
- data/lib/duck_testing/reporter/base.rb +17 -0
- data/lib/duck_testing/reporter/raise_error.rb +30 -0
- data/lib/duck_testing/tester.rb +50 -0
- data/lib/duck_testing/type/base.rb +13 -0
- data/lib/duck_testing/type/class_instance.rb +24 -0
- data/lib/duck_testing/type/constant.rb +26 -0
- data/lib/duck_testing/type/duck_type.rb +24 -0
- data/lib/duck_testing/type/hash.rb +60 -0
- data/lib/duck_testing/type/order_dependent_array.rb +27 -0
- data/lib/duck_testing/type/order_independent_array.rb +27 -0
- data/lib/duck_testing/version.rb +3 -0
- data/lib/duck_testing/violation.rb +41 -0
- data/lib/duck_testing/yard.rb +51 -0
- data/lib/duck_testing/yard/builder.rb +70 -0
- data/lib/duck_testing/yard/class_object.rb +20 -0
- data/lib/duck_testing/yard/code_object.rb +22 -0
- data/lib/duck_testing/yard/method_object.rb +87 -0
- data/lib/duck_testing/yard/method_parameter.rb +49 -0
- data/lib/duck_testing/yard/parser.rb +30 -0
- data/sample/.gitignore +35 -0
- data/sample/.rspec +3 -0
- data/sample/Gemfile +5 -0
- data/sample/lib/concern.rb +9 -0
- data/sample/lib/sample.rb +14 -0
- data/sample/spec/sample_spec.rb +33 -0
- data/sample/spec/spec_helper.rb +4 -0
- data/spec/.rubocop.yml +8 -0
- data/spec/class_type_integration_spec.rb +98 -0
- data/spec/constant_type_integration_spec.rb +90 -0
- data/spec/duck_testing/method_call_data_spec.rb +24 -0
- data/spec/duck_testing/reporter/raise_error_spec.rb +35 -0
- data/spec/duck_testing/tester_spec.rb +73 -0
- data/spec/duck_testing/violation_spec.rb +58 -0
- data/spec/duck_testing/yard/builder_spec.rb +179 -0
- data/spec/duck_testing/yard/parser_spec.rb +38 -0
- data/spec/duck_type_integration_spec.rb +89 -0
- data/spec/hash_type_integration_spec.rb +112 -0
- data/spec/order_dependent_array_type_integration_spec.rb +121 -0
- data/spec/order_independent_array_type_integration_spec.rb +104 -0
- data/spec/spec_helper.rb +78 -0
- metadata +212 -0
@@ -0,0 +1,121 @@
|
|
1
|
+
describe "OrderIndependentArray type integration spec" do
|
2
|
+
subject do
|
3
|
+
instance.find(*params)
|
4
|
+
end
|
5
|
+
|
6
|
+
before do
|
7
|
+
klass.send(:prepend, duck_testing_module)
|
8
|
+
end
|
9
|
+
|
10
|
+
let(:instance) { klass.new }
|
11
|
+
|
12
|
+
let(:klass) do
|
13
|
+
Class.new do
|
14
|
+
# @param keylist [Array<Array<(Symbol, Object)>>]
|
15
|
+
# @param key [Symbol]
|
16
|
+
# @return [Object]
|
17
|
+
def find(keylist, key)
|
18
|
+
keylist.each do |(k, value)|
|
19
|
+
return value if k == key
|
20
|
+
end
|
21
|
+
nil
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
context "when expected parameter and return are given" do
|
27
|
+
let(:params) { [[[:a, 1], [:b, 2]], :b] }
|
28
|
+
|
29
|
+
let(:duck_testing_module) do
|
30
|
+
Module.new do
|
31
|
+
def find(keylist, key)
|
32
|
+
tester = DuckTesting::Tester.new(self, "find")
|
33
|
+
tester.test_param(keylist, [
|
34
|
+
DuckTesting::Type::OrderIndependentArray.new(
|
35
|
+
DuckTesting::Type::OrderDependentArray.new(
|
36
|
+
DuckTesting::Type::ClassInstance.new(Symbol),
|
37
|
+
DuckTesting::Type::ClassInstance.new(Object)
|
38
|
+
)
|
39
|
+
)
|
40
|
+
])
|
41
|
+
tester.test_param(key, [
|
42
|
+
DuckTesting::Type::ClassInstance.new(Symbol)
|
43
|
+
])
|
44
|
+
tester.test_return(super, [
|
45
|
+
DuckTesting::Type::ClassInstance.new(Object)
|
46
|
+
])
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
it "does not raise error" do
|
52
|
+
expect { subject }.not_to raise_error
|
53
|
+
end
|
54
|
+
|
55
|
+
it "returns original result" do
|
56
|
+
should eq 2
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
context "when unexpected parameter is given" do
|
61
|
+
let(:params) { [[["a", 1], ["b", 2]], "b"] }
|
62
|
+
|
63
|
+
let(:duck_testing_module) do
|
64
|
+
Module.new do
|
65
|
+
def find(keylist, key)
|
66
|
+
tester = DuckTesting::Tester.new(self, "find")
|
67
|
+
tester.test_param(keylist, [
|
68
|
+
DuckTesting::Type::OrderIndependentArray.new(
|
69
|
+
DuckTesting::Type::OrderDependentArray.new(
|
70
|
+
DuckTesting::Type::ClassInstance.new(Symbol),
|
71
|
+
DuckTesting::Type::ClassInstance.new(Object)
|
72
|
+
)
|
73
|
+
)
|
74
|
+
])
|
75
|
+
tester.test_param(key, [
|
76
|
+
DuckTesting::Type::ClassInstance.new(Symbol)
|
77
|
+
])
|
78
|
+
tester.test_return(super, [
|
79
|
+
DuckTesting::Type::ClassInstance.new(Object)
|
80
|
+
])
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
it "raises ContractViolationError" do
|
86
|
+
expect { subject }.to raise_error(DuckTesting::ContractViolationError)
|
87
|
+
expect { subject }.to raise_error(/Contract violation for argument/)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
context "when unexpected result is given" do
|
92
|
+
let(:params) { [[[:a, 1], [:b, 2]], :b] }
|
93
|
+
|
94
|
+
let(:duck_testing_module) do
|
95
|
+
Module.new do
|
96
|
+
def find(keylist, key)
|
97
|
+
tester = DuckTesting::Tester.new(self, "find")
|
98
|
+
tester.test_param(keylist, [
|
99
|
+
DuckTesting::Type::OrderIndependentArray.new(
|
100
|
+
DuckTesting::Type::OrderDependentArray.new(
|
101
|
+
DuckTesting::Type::ClassInstance.new(Symbol),
|
102
|
+
DuckTesting::Type::ClassInstance.new(Object)
|
103
|
+
)
|
104
|
+
)
|
105
|
+
])
|
106
|
+
tester.test_param(key, [
|
107
|
+
DuckTesting::Type::ClassInstance.new(Symbol)
|
108
|
+
])
|
109
|
+
tester.test_return(super, [
|
110
|
+
DuckTesting::Type::ClassInstance.new(Symbol)
|
111
|
+
])
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
it "raises ContractViolationError" do
|
117
|
+
expect { subject }.to raise_error(DuckTesting::ContractViolationError)
|
118
|
+
expect { subject }.to raise_error(/Contract violation for return value/)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
@@ -0,0 +1,104 @@
|
|
1
|
+
describe "OrderIndependentArray type integration spec" do
|
2
|
+
subject do
|
3
|
+
instance.sum(param)
|
4
|
+
end
|
5
|
+
|
6
|
+
before do
|
7
|
+
klass.send(:prepend, duck_testing_module)
|
8
|
+
end
|
9
|
+
|
10
|
+
let(:instance) { klass.new }
|
11
|
+
|
12
|
+
let(:klass) do
|
13
|
+
Class.new do
|
14
|
+
# @param array [Array<Fixnum, Float>]
|
15
|
+
# @return [Fixnum, Float]
|
16
|
+
def sum(array)
|
17
|
+
array.reduce(&:+)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
context "when expected parameter and return are given" do
|
23
|
+
let(:param) { [1, 0.1] }
|
24
|
+
|
25
|
+
let(:duck_testing_module) do
|
26
|
+
Module.new do
|
27
|
+
def sum(array)
|
28
|
+
tester = DuckTesting::Tester.new(self, "sum")
|
29
|
+
tester.test_param(array, [
|
30
|
+
DuckTesting::Type::OrderIndependentArray.new(
|
31
|
+
DuckTesting::Type::ClassInstance.new(Fixnum),
|
32
|
+
DuckTesting::Type::ClassInstance.new(Float)
|
33
|
+
)
|
34
|
+
])
|
35
|
+
tester.test_return(super, [
|
36
|
+
DuckTesting::Type::ClassInstance.new(Fixnum),
|
37
|
+
DuckTesting::Type::ClassInstance.new(Float)
|
38
|
+
])
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
it "does not raise error" do
|
44
|
+
expect { subject }.not_to raise_error
|
45
|
+
end
|
46
|
+
|
47
|
+
it "returns original result" do
|
48
|
+
should eq 1.1
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
context "when unexpected parameter is given" do
|
53
|
+
let(:param) { "string" }
|
54
|
+
|
55
|
+
let(:duck_testing_module) do
|
56
|
+
Module.new do
|
57
|
+
def sum(array)
|
58
|
+
tester = DuckTesting::Tester.new(self, "sum")
|
59
|
+
tester.test_param(array, [
|
60
|
+
DuckTesting::Type::OrderIndependentArray.new(
|
61
|
+
DuckTesting::Type::ClassInstance.new(Fixnum),
|
62
|
+
DuckTesting::Type::ClassInstance.new(Float)
|
63
|
+
)
|
64
|
+
])
|
65
|
+
tester.test_return(super, [
|
66
|
+
DuckTesting::Type::ClassInstance.new(Fixnum),
|
67
|
+
DuckTesting::Type::ClassInstance.new(Float)
|
68
|
+
])
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
it "raises ContractViolationError" do
|
74
|
+
expect { subject }.to raise_error(DuckTesting::ContractViolationError)
|
75
|
+
expect { subject }.to raise_error(/Contract violation for argument/)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
context "when unexpected result is given" do
|
80
|
+
let(:param) { [1, 0.1] }
|
81
|
+
|
82
|
+
let(:duck_testing_module) do
|
83
|
+
Module.new do
|
84
|
+
def sum(array)
|
85
|
+
tester = DuckTesting::Tester.new(self, "sum")
|
86
|
+
tester.test_param(array, [
|
87
|
+
DuckTesting::Type::OrderIndependentArray.new(
|
88
|
+
DuckTesting::Type::ClassInstance.new(Fixnum),
|
89
|
+
DuckTesting::Type::ClassInstance.new(Float)
|
90
|
+
)
|
91
|
+
])
|
92
|
+
tester.test_return(super, [
|
93
|
+
DuckTesting::Type::ClassInstance.new(String)
|
94
|
+
])
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
it "raises ContractViolationError" do
|
100
|
+
expect { subject }.to raise_error(DuckTesting::ContractViolationError)
|
101
|
+
expect { subject }.to raise_error(/Contract violation for return value/)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
require "coveralls"
|
2
|
+
Coveralls.wear!
|
3
|
+
|
4
|
+
require "duck_testing"
|
5
|
+
require "pry"
|
6
|
+
|
7
|
+
RSpec.configure do |config|
|
8
|
+
# rspec-expectations config goes here. You can use an alternate
|
9
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
10
|
+
# assertions if you prefer.
|
11
|
+
config.expect_with :rspec do |expectations|
|
12
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
13
|
+
# and `failure_message` of custom matchers include text for helper methods
|
14
|
+
# defined using `chain`, e.g.:
|
15
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
16
|
+
# # => "be bigger than 2 and smaller than 4"
|
17
|
+
# ...rather than:
|
18
|
+
# # => "be bigger than 2"
|
19
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
20
|
+
end
|
21
|
+
|
22
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
23
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
24
|
+
config.mock_with :rspec do |mocks|
|
25
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
26
|
+
# a real object. This is generally recommended, and will default to
|
27
|
+
# `true` in RSpec 4.
|
28
|
+
mocks.verify_partial_doubles = true
|
29
|
+
end
|
30
|
+
|
31
|
+
# These two settings work together to allow you to limit a spec run
|
32
|
+
# to individual examples or groups you care about by tagging them with
|
33
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
34
|
+
# get run.
|
35
|
+
config.filter_run :focus
|
36
|
+
config.run_all_when_everything_filtered = true
|
37
|
+
|
38
|
+
# Allows RSpec to persist some state between runs in order to support
|
39
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
40
|
+
# you configure your source control system to ignore this file.
|
41
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
42
|
+
|
43
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
44
|
+
# recommended. For more details, see:
|
45
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
46
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
47
|
+
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
48
|
+
config.disable_monkey_patching!
|
49
|
+
|
50
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
51
|
+
# file, and it's useful to allow more verbose output when running an
|
52
|
+
# individual spec file.
|
53
|
+
if config.files_to_run.one?
|
54
|
+
# Use the documentation formatter for detailed output,
|
55
|
+
# unless a formatter has already been configured
|
56
|
+
# (e.g. via a command-line flag).
|
57
|
+
config.default_formatter = "doc"
|
58
|
+
end
|
59
|
+
|
60
|
+
# Print the 10 slowest examples and example groups at the
|
61
|
+
# end of the spec run, to help surface which specs are running
|
62
|
+
# particularly slow.
|
63
|
+
# config.profile_examples = 10
|
64
|
+
|
65
|
+
# Run specs in random order to surface order dependencies. If you find an
|
66
|
+
# order dependency and want to debug it, you can fix the order by providing
|
67
|
+
# the seed, which is printed after each run.
|
68
|
+
# --seed 1234
|
69
|
+
config.order = :random
|
70
|
+
|
71
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
72
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
73
|
+
# test failures related to randomization by passing the same `--seed` value
|
74
|
+
# as the one that triggered the failure.
|
75
|
+
Kernel.srand config.seed
|
76
|
+
|
77
|
+
config.expose_dsl_globally = true
|
78
|
+
end
|
metadata
ADDED
@@ -0,0 +1,212 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: duck_testing
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Yuku Takahashi
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-12-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: yard
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.8.7
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.8.7
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: guard
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.12'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.12'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: guard-rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '4.6'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '4.6'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: guard-rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.2'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.2'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.10.3
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.10.3
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '10.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '10.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '3.3'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '3.3'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.35.1
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.35.1
|
125
|
+
description: Data type testing tool
|
126
|
+
email:
|
127
|
+
- taka84u9@gmail.com
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files: []
|
131
|
+
files:
|
132
|
+
- ".gitignore"
|
133
|
+
- ".rspec"
|
134
|
+
- ".rubocop.yml"
|
135
|
+
- ".travis.yml"
|
136
|
+
- ".yardopts"
|
137
|
+
- CHANGELOG.md
|
138
|
+
- Gemfile
|
139
|
+
- Guardfile
|
140
|
+
- LICENSE
|
141
|
+
- README.md
|
142
|
+
- Rakefile
|
143
|
+
- duck_testing.gemspec
|
144
|
+
- lib/duck_testing.rb
|
145
|
+
- lib/duck_testing/errors.rb
|
146
|
+
- lib/duck_testing/method_call_data.rb
|
147
|
+
- lib/duck_testing/reporter/base.rb
|
148
|
+
- lib/duck_testing/reporter/raise_error.rb
|
149
|
+
- lib/duck_testing/tester.rb
|
150
|
+
- lib/duck_testing/type/base.rb
|
151
|
+
- lib/duck_testing/type/class_instance.rb
|
152
|
+
- lib/duck_testing/type/constant.rb
|
153
|
+
- lib/duck_testing/type/duck_type.rb
|
154
|
+
- lib/duck_testing/type/hash.rb
|
155
|
+
- lib/duck_testing/type/order_dependent_array.rb
|
156
|
+
- lib/duck_testing/type/order_independent_array.rb
|
157
|
+
- lib/duck_testing/version.rb
|
158
|
+
- lib/duck_testing/violation.rb
|
159
|
+
- lib/duck_testing/yard.rb
|
160
|
+
- lib/duck_testing/yard/builder.rb
|
161
|
+
- lib/duck_testing/yard/class_object.rb
|
162
|
+
- lib/duck_testing/yard/code_object.rb
|
163
|
+
- lib/duck_testing/yard/method_object.rb
|
164
|
+
- lib/duck_testing/yard/method_parameter.rb
|
165
|
+
- lib/duck_testing/yard/parser.rb
|
166
|
+
- sample/.gitignore
|
167
|
+
- sample/.rspec
|
168
|
+
- sample/Gemfile
|
169
|
+
- sample/lib/concern.rb
|
170
|
+
- sample/lib/sample.rb
|
171
|
+
- sample/spec/sample_spec.rb
|
172
|
+
- sample/spec/spec_helper.rb
|
173
|
+
- spec/.rubocop.yml
|
174
|
+
- spec/class_type_integration_spec.rb
|
175
|
+
- spec/constant_type_integration_spec.rb
|
176
|
+
- spec/duck_testing/method_call_data_spec.rb
|
177
|
+
- spec/duck_testing/reporter/raise_error_spec.rb
|
178
|
+
- spec/duck_testing/tester_spec.rb
|
179
|
+
- spec/duck_testing/violation_spec.rb
|
180
|
+
- spec/duck_testing/yard/builder_spec.rb
|
181
|
+
- spec/duck_testing/yard/parser_spec.rb
|
182
|
+
- spec/duck_type_integration_spec.rb
|
183
|
+
- spec/hash_type_integration_spec.rb
|
184
|
+
- spec/order_dependent_array_type_integration_spec.rb
|
185
|
+
- spec/order_independent_array_type_integration_spec.rb
|
186
|
+
- spec/spec_helper.rb
|
187
|
+
homepage: https://github.com/yuku-t/duck_testing
|
188
|
+
licenses:
|
189
|
+
- MIT
|
190
|
+
metadata: {}
|
191
|
+
post_install_message:
|
192
|
+
rdoc_options: []
|
193
|
+
require_paths:
|
194
|
+
- lib
|
195
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
196
|
+
requirements:
|
197
|
+
- - ">="
|
198
|
+
- !ruby/object:Gem::Version
|
199
|
+
version: '2.0'
|
200
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
201
|
+
requirements:
|
202
|
+
- - ">="
|
203
|
+
- !ruby/object:Gem::Version
|
204
|
+
version: '0'
|
205
|
+
requirements: []
|
206
|
+
rubyforge_project:
|
207
|
+
rubygems_version: 2.4.5.1
|
208
|
+
signing_key:
|
209
|
+
specification_version: 4
|
210
|
+
summary: Data type testing tool
|
211
|
+
test_files: []
|
212
|
+
has_rdoc:
|