rdoba 0.9.1 → 0.9.4
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 -7
- data/.gitignore +4 -0
- data/.travis.yml +28 -0
- data/CHANGES.md +6 -0
- data/Gemfile +5 -0
- data/README.md +87 -108
- data/Rakefile +62 -54
- data/TODO +6 -0
- data/features/mixin.feature +85 -0
- data/features/step_definitions/mixin_steps.rb +305 -0
- data/features/support/env.rb +35 -145
- data/features/support/mixin_support.rb +17 -0
- data/html/.keep +0 -0
- data/lib/rdoba/_version_.rb +3 -1
- data/lib/rdoba/a.rb +44 -42
- data/lib/rdoba/bcd.rb +43 -26
- data/lib/rdoba/blank.rb +14 -0
- data/lib/rdoba/combinations.rb +17 -15
- data/lib/rdoba/common.rb +53 -68
- data/lib/rdoba/debug.rb +9 -3
- data/lib/rdoba/deploy.rb +55 -50
- data/lib/rdoba/dup.rb +31 -31
- data/lib/rdoba/fe.rb +6 -5
- data/lib/rdoba/gem.rb +33 -29
- data/lib/rdoba/hashorder.rb +24 -24
- data/lib/rdoba/io.rb +81 -74
- data/lib/rdoba/merge.rb +21 -0
- data/lib/rdoba/mixin/time.rb +17 -0
- data/lib/rdoba/mixin/try.rb +11 -0
- data/lib/rdoba/mixin/try_1_9_0.rb +9 -0
- data/lib/rdoba/mixin/wait_if.rb +27 -0
- data/lib/rdoba/mixin.rb +373 -52
- data/lib/rdoba/numeric.rb +19 -17
- data/lib/rdoba/os.rb +127 -0
- data/lib/rdoba/re.rb +4 -4
- data/lib/rdoba/require.rb +24 -19
- data/lib/rdoba/roman.rb +32 -22
- data/lib/rdoba/strings.rb +6 -144
- data/lib/rdoba/yaml.rb +20 -18
- data/lib/rdoba.rb +50 -47
- data/rdoba.gemspec +33 -26
- data/tddium.yml +11 -0
- metadata +184 -77
- data/features/bcd.feature +0 -29
- data/features/log.feature +0 -206
- data/features/step_definitions/bcd_steps.rb +0 -69
- data/features/step_definitions/log_steps.rb +0 -164
- data/lib/rdoba/log.rb +0 -248
- data/test/helper.rb +0 -18
- data/test/rdoba_test.rb.stub +0 -59
- data/test/test_rdoba.rb +0 -7
metadata
CHANGED
@@ -1,81 +1,193 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdoba
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
7
|
-
-
|
8
|
-
autorequire:
|
6
|
+
authors:
|
7
|
+
- Малъ Скрылёвъ (Malo Skrylevo)
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: "0"
|
11
|
+
date: 2022-05-06 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: coveralls
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
32
34
|
type: :development
|
33
35
|
prerelease: false
|
34
|
-
version_requirements:
|
35
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
36
42
|
name: cucumber
|
37
|
-
requirement:
|
38
|
-
requirements:
|
39
|
-
- - ~>
|
40
|
-
-
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.3'
|
41
48
|
type: :development
|
42
49
|
prerelease: false
|
43
|
-
version_requirements:
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: ffi-stat
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.4'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.4'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '12.0'
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 12.3.3
|
79
|
+
type: :development
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - "~>"
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '12.0'
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 12.3.3
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: rdiscount
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '2.1'
|
49
96
|
type: :development
|
50
97
|
prerelease: false
|
51
|
-
version_requirements:
|
52
|
-
|
53
|
-
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '2.1'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: rdoc
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '6.2'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '6.2'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: rspec-expectations
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '3.3'
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '3.3'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: simplecov
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - "~>"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - "~>"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: tddium
|
147
|
+
requirement: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - "~>"
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '1.25'
|
152
|
+
type: :development
|
153
|
+
prerelease: false
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - "~>"
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '1.25'
|
159
|
+
description: Ruby extension library. It extends Kernel, Object, String, Hash, Array,
|
160
|
+
and some other classes. Also allows to log application state with debug lines to
|
161
|
+
an io
|
162
|
+
email:
|
54
163
|
- 3aHyga@gmail.com
|
55
164
|
executables: []
|
56
|
-
|
57
165
|
extensions: []
|
58
|
-
|
59
|
-
extra_rdoc_files:
|
166
|
+
extra_rdoc_files:
|
60
167
|
- README.md
|
61
168
|
- LICENSE
|
62
|
-
|
63
|
-
-
|
64
|
-
|
169
|
+
- CHANGES.md
|
170
|
+
- html/.keep
|
171
|
+
files:
|
172
|
+
- ".document"
|
173
|
+
- ".gitignore"
|
174
|
+
- ".travis.yml"
|
65
175
|
- CHANGES.md
|
66
176
|
- Gemfile
|
67
177
|
- LICENSE
|
68
178
|
- README.md
|
69
179
|
- Rakefile
|
70
|
-
-
|
71
|
-
- features/
|
72
|
-
- features/step_definitions/
|
73
|
-
- features/step_definitions/log_steps.rb
|
180
|
+
- TODO
|
181
|
+
- features/mixin.feature
|
182
|
+
- features/step_definitions/mixin_steps.rb
|
74
183
|
- features/support/env.rb
|
184
|
+
- features/support/mixin_support.rb
|
185
|
+
- html/.keep
|
75
186
|
- lib/rdoba.rb
|
76
187
|
- lib/rdoba/_version_.rb
|
77
188
|
- lib/rdoba/a.rb
|
78
189
|
- lib/rdoba/bcd.rb
|
190
|
+
- lib/rdoba/blank.rb
|
79
191
|
- lib/rdoba/combinations.rb
|
80
192
|
- lib/rdoba/common.rb
|
81
193
|
- lib/rdoba/debug.rb
|
@@ -85,51 +197,46 @@ files:
|
|
85
197
|
- lib/rdoba/gem.rb
|
86
198
|
- lib/rdoba/hashorder.rb
|
87
199
|
- lib/rdoba/io.rb
|
88
|
-
- lib/rdoba/
|
200
|
+
- lib/rdoba/merge.rb
|
89
201
|
- lib/rdoba/mixin.rb
|
202
|
+
- lib/rdoba/mixin/time.rb
|
203
|
+
- lib/rdoba/mixin/try.rb
|
204
|
+
- lib/rdoba/mixin/try_1_9_0.rb
|
205
|
+
- lib/rdoba/mixin/wait_if.rb
|
90
206
|
- lib/rdoba/numeric.rb
|
207
|
+
- lib/rdoba/os.rb
|
91
208
|
- lib/rdoba/re.rb
|
92
209
|
- lib/rdoba/require.rb
|
93
210
|
- lib/rdoba/roman.rb
|
94
211
|
- lib/rdoba/strings.rb
|
95
212
|
- lib/rdoba/yaml.rb
|
96
213
|
- rdoba.gemspec
|
97
|
-
-
|
98
|
-
- test/rdoba_test.rb.stub
|
99
|
-
- test/test_rdoba.rb
|
214
|
+
- tddium.yml
|
100
215
|
homepage: https://github.com/3aHyga/rdoba
|
101
|
-
licenses:
|
216
|
+
licenses:
|
102
217
|
- MIT
|
103
218
|
metadata: {}
|
104
|
-
|
105
|
-
post_install_message:
|
219
|
+
post_install_message:
|
106
220
|
rdoc_options: []
|
107
|
-
|
108
|
-
require_paths:
|
221
|
+
require_paths:
|
109
222
|
- lib
|
110
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
111
|
-
requirements:
|
223
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
224
|
+
requirements:
|
112
225
|
- - ">="
|
113
|
-
- !ruby/object:Gem::Version
|
226
|
+
- !ruby/object:Gem::Version
|
114
227
|
version: 1.9.0
|
115
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
|
-
requirements:
|
228
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
229
|
+
requirements:
|
117
230
|
- - ">="
|
118
|
-
- !ruby/object:Gem::Version
|
231
|
+
- !ruby/object:Gem::Version
|
119
232
|
version: 1.6.0
|
120
233
|
requirements: []
|
121
|
-
|
122
|
-
|
123
|
-
rubygems_version: 2.1.4
|
124
|
-
signing_key:
|
234
|
+
rubygems_version: 3.1.6
|
235
|
+
signing_key:
|
125
236
|
specification_version: 4
|
126
237
|
summary: Ruby extension library (Ruby DOBAvka)
|
127
|
-
test_files:
|
128
|
-
- features/
|
129
|
-
- features/
|
130
|
-
- features/step_definitions/bcd_steps.rb
|
131
|
-
- features/step_definitions/log_steps.rb
|
238
|
+
test_files:
|
239
|
+
- features/mixin.feature
|
240
|
+
- features/step_definitions/mixin_steps.rb
|
132
241
|
- features/support/env.rb
|
133
|
-
-
|
134
|
-
- test/rdoba_test.rb.stub
|
135
|
-
- test/test_rdoba.rb
|
242
|
+
- features/support/mixin_support.rb
|
data/features/bcd.feature
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
Feature: Rdoba BCD testing
|
2
|
-
Scenario: Simple BCD creation scenario
|
3
|
-
Given Apply Rdoba bcd module
|
4
|
-
When Rdoba applied in a code
|
5
|
-
Then Create a new simple BCD string
|
6
|
-
Scenario: Simple BCD creation scenario
|
7
|
-
Given Apply Rdoba bcd module
|
8
|
-
When Rdoba applied in a code
|
9
|
-
Then Parse an integer
|
10
|
-
Then Check class to BCD of parsed integer
|
11
|
-
Scenario: Try to parse a negative integer scenario
|
12
|
-
Given Apply Rdoba bcd module
|
13
|
-
When Rdoba applied in a code
|
14
|
-
Then Parse a negative integer
|
15
|
-
Scenario: Converting BCD to an integer scenario
|
16
|
-
Given Apply Rdoba bcd module
|
17
|
-
When Rdoba applied in a code
|
18
|
-
When Create a new simple BCD string
|
19
|
-
Then Convert the simple BCD to an integer
|
20
|
-
Scenario: Bignum BCD creation scenario
|
21
|
-
Given Apply Rdoba bcd module
|
22
|
-
When Rdoba applied in a code
|
23
|
-
When Create a new bignum BCD string
|
24
|
-
Then Convert the BCD to a Bignum integer
|
25
|
-
Scenario: Erroneous BCD scenario
|
26
|
-
Given Apply Rdoba bcd module
|
27
|
-
When Rdoba applied in a code
|
28
|
-
Then Try to create a BCD class with an erroneous argument
|
29
|
-
|
data/features/log.feature
DELETED
@@ -1,206 +0,0 @@
|
|
1
|
-
Feature: Rdoba Log
|
2
|
-
In order to check proper logging facility
|
3
|
-
Rdoba Log should work with various settings
|
4
|
-
|
5
|
-
Scenario: Rdoba Log default settings
|
6
|
-
Given applied Rdoba Log module
|
7
|
-
When we issue an output of a variable
|
8
|
-
And look into stdout
|
9
|
-
Then we see the variable output
|
10
|
-
|
11
|
-
Scenario: Rdoba Debug backward compatibility with warning
|
12
|
-
Given applied Rdoba Debug module
|
13
|
-
When we issue an output of a variable
|
14
|
-
And we look into stderr
|
15
|
-
Then we see a warning
|
16
|
-
When look into stdout
|
17
|
-
Then we see the variable output
|
18
|
-
|
19
|
-
Scenario: Rdoba Log :io option
|
20
|
-
Given applied Rdoba Log module with set a file name for :io option
|
21
|
-
When we issue an output of a variable
|
22
|
-
And look into the file
|
23
|
-
Then we see the variable output
|
24
|
-
When look into stdout
|
25
|
-
Then we see nothing
|
26
|
-
|
27
|
-
Scenario: Rdoba Log :as option
|
28
|
-
Given applied Rdoba Log module with set a keyword for :as option
|
29
|
-
When we issue an output of a variable
|
30
|
-
And look into stdout
|
31
|
-
Then we see nothing
|
32
|
-
When we look into stderr
|
33
|
-
And see the no method error exception
|
34
|
-
|
35
|
-
When we issue an output of a variable using a keyword
|
36
|
-
And look into stdout
|
37
|
-
Then we see the variable output
|
38
|
-
|
39
|
-
When we issue an output of a variable using an invalid keyword
|
40
|
-
And look into stdout
|
41
|
-
Then we see nothing
|
42
|
-
When we look into stderr
|
43
|
-
Then see the name error exception
|
44
|
-
|
45
|
-
Scenario: Rdoba Log :in option
|
46
|
-
Given applied Rdoba Log module with set Cls keyword for :in option
|
47
|
-
When we issue an output of a variable
|
48
|
-
And look into stdout
|
49
|
-
Then we see nothing
|
50
|
-
When we look into stderr
|
51
|
-
Then see the no method error exception
|
52
|
-
|
53
|
-
When issue a creation of the class
|
54
|
-
And look into stdout
|
55
|
-
Then we see the variable output
|
56
|
-
|
57
|
-
Scenario: Rdoba Log :functions option
|
58
|
-
Given applied Rdoba Log module with set :extended keyword for :functions option
|
59
|
-
When we issue an :extended output of a variable
|
60
|
-
And look into stdout
|
61
|
-
Then we see the variable output with the :extended notice
|
62
|
-
|
63
|
-
When we remove :extended keyword out of :functions option
|
64
|
-
And we issue an :extended output of a variable
|
65
|
-
And look into stdout
|
66
|
-
Then we see nothing
|
67
|
-
|
68
|
-
When we issue an :enter output of a variable
|
69
|
-
And look into stdout
|
70
|
-
Then we see nothing
|
71
|
-
When we add :enter keyword out of :functions option
|
72
|
-
And we issue an :enter output of a variable
|
73
|
-
And look into stdout
|
74
|
-
Then we see the variable output with the :enter notice
|
75
|
-
|
76
|
-
When we issue a :leave output of a variable
|
77
|
-
And look into stdout
|
78
|
-
Then we see nothing
|
79
|
-
When we add :leave keyword out of :functions option
|
80
|
-
And issue a :leave output of a variable
|
81
|
-
And look into stdout
|
82
|
-
Then we see the 'true' value output with the :leave notice
|
83
|
-
|
84
|
-
When we issue an :info output of a variable
|
85
|
-
And look into stdout
|
86
|
-
Then we see nothing
|
87
|
-
When we add :info keyword out of :functions option
|
88
|
-
And we issue an :info output of a variable
|
89
|
-
And look into stdout
|
90
|
-
Then we see the variable output with the :info notice
|
91
|
-
|
92
|
-
When we issue an :warn output of a variable
|
93
|
-
And look into stdout
|
94
|
-
Then we see nothing
|
95
|
-
When we add :warn keyword out of :functions option
|
96
|
-
And we issue an :warn output of a variable
|
97
|
-
And look into stdout
|
98
|
-
Then we see the variable output with the :warn notice
|
99
|
-
|
100
|
-
When we issue a :compat output of a variable
|
101
|
-
And look into stdout
|
102
|
-
Then we see nothing
|
103
|
-
When we look into stderr
|
104
|
-
Then see the no method error exception
|
105
|
-
|
106
|
-
When we add :compat keyword out of :functions option
|
107
|
-
And issue a :compat output of a variable
|
108
|
-
And look into stdout
|
109
|
-
Then we see the variable output
|
110
|
-
|
111
|
-
When we clear the :functions option
|
112
|
-
And we issue an output of a variable
|
113
|
-
And look into stdout
|
114
|
-
Then we see nothing
|
115
|
-
|
116
|
-
Scenario: Rdoba Log :prefix option
|
117
|
-
Given applied Rdoba Log module with set :timestamp keyword for :prefix option
|
118
|
-
When we issue an output of a variable
|
119
|
-
And look into stdout
|
120
|
-
Then we see the variable output preficed with the :timestamp
|
121
|
-
|
122
|
-
When we apply Rdoba Log module with set :timestamp, and :pid keyword for :prefix option
|
123
|
-
And issue an output of a variable
|
124
|
-
And look into stdout
|
125
|
-
Then we see the variable output preficed with the :timestamp, and :pid
|
126
|
-
|
127
|
-
When we apply Rdoba Log module with set :timestamp, :pid, and :function_name keyword for :prefix option
|
128
|
-
And issue an output of a variable
|
129
|
-
And look into stdout
|
130
|
-
Then we see the variable output preficed with the :timestamp, :pid, and :function_name
|
131
|
-
|
132
|
-
When we apply Rdoba Log module with set :timestamp, :pid, :function_name, and :function_line keyword for :prefix option
|
133
|
-
And issue an output of a variable
|
134
|
-
And look into stdout
|
135
|
-
Then we see the variable output preficed with the :timestamp, :pid, :function_name, and :function_line
|
136
|
-
|
137
|
-
When we apply Rdoba Log module with set :timestamp, :pid, and :function_line keyword for :prefix option
|
138
|
-
And issue an output of a variable
|
139
|
-
And look into stdout
|
140
|
-
Then we see the variable output preficed with the :timestamp, :pid
|
141
|
-
|
142
|
-
Scenario: Rdoba Log parameter processing
|
143
|
-
Given applied Rdoba Log module
|
144
|
-
When we issue an output of a string
|
145
|
-
And look into stdout
|
146
|
-
Then we see the string output
|
147
|
-
|
148
|
-
When we issue an output of a number
|
149
|
-
And look into stdout
|
150
|
-
Then we see the number output
|
151
|
-
|
152
|
-
When we issue an output of an array
|
153
|
-
And look into stdout
|
154
|
-
Then we see the array output
|
155
|
-
|
156
|
-
Scenario: Rdoba Exception information output
|
157
|
-
Given applied Rdoba Log module
|
158
|
-
When we issue an output of the thrown exception
|
159
|
-
And look into stderr
|
160
|
-
Then we see the exception info
|
161
|
-
|
162
|
-
When we issue an output of the thrown exception to the stdout
|
163
|
-
And look into stderr
|
164
|
-
Then we see nothing
|
165
|
-
When we look into stdout
|
166
|
-
Then we see the exception info
|
167
|
-
|
168
|
-
When we issue an output of the thrown standard error
|
169
|
-
And look into stderr
|
170
|
-
Then we see the standard error info
|
171
|
-
|
172
|
-
When we issue an output of the thrown standard error with a notification
|
173
|
-
And look into stderr
|
174
|
-
Then we see the standard error info with a notification
|
175
|
-
|
176
|
-
Scenario: Rdoba Log class implementation
|
177
|
-
Given applied Rdoba Log module inside a class
|
178
|
-
When we issue an output of a variable
|
179
|
-
And look into stdout
|
180
|
-
Then we see the variable output
|
181
|
-
|
182
|
-
When define an output of a variable inside an initializer
|
183
|
-
And issue a creation of the class
|
184
|
-
And look into stdout
|
185
|
-
Then we see the variable output
|
186
|
-
|
187
|
-
When we define an output of a variable inside a singleton function
|
188
|
-
And issue a call to the function
|
189
|
-
And look into stdout
|
190
|
-
Then we see the variable output
|
191
|
-
|
192
|
-
When we apply Rdoba Log module with set a keyword for :as option inside a class
|
193
|
-
And issue an output of a variable using a keyword
|
194
|
-
And look into stdout
|
195
|
-
Then we see the variable output
|
196
|
-
|
197
|
-
When define an output of a variable inside an initializer using a keyword
|
198
|
-
And issue a creation of the class
|
199
|
-
And look into stdout
|
200
|
-
Then we see the variable output
|
201
|
-
|
202
|
-
When we define an output of a variable inside a singleton function using a keyword
|
203
|
-
And issue a call to the function
|
204
|
-
And look into stdout
|
205
|
-
Then we see the variable output
|
206
|
-
|
@@ -1,69 +0,0 @@
|
|
1
|
-
#encoding: utf-8
|
2
|
-
|
3
|
-
require 'test/unit/assertions'
|
4
|
-
|
5
|
-
World( Test::Unit::Assertions )
|
6
|
-
|
7
|
-
Given 'Apply Rdoba bcd module' do
|
8
|
-
require 'rdoba'
|
9
|
-
end
|
10
|
-
|
11
|
-
When 'Rdoba applied in a code' do
|
12
|
-
rdoba :bcd
|
13
|
-
end
|
14
|
-
|
15
|
-
Then 'Create a new simple BCD string' do
|
16
|
-
@bcd = BCDString.new 12345
|
17
|
-
assert @bcd == "\x45\x23\x01",
|
18
|
-
"The BCD, which has been converted from an integer, has invalid value"
|
19
|
-
end
|
20
|
-
|
21
|
-
Then 'Parse an integer' do
|
22
|
-
@bcd = BCD.parse 12345
|
23
|
-
assert @bcd == "\x45\x23\x01",
|
24
|
-
"The BCD, which has been converted from an integer, has invalid value"
|
25
|
-
end
|
26
|
-
|
27
|
-
Then 'Parse a negative integer' do
|
28
|
-
begin
|
29
|
-
assert BCD.parse( -12345 ),
|
30
|
-
"A negative integer has been parse, that is wrong"
|
31
|
-
rescue BCD::ParseError
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
Then 'Check class to BCD of parsed integer' do
|
36
|
-
assert @bcd.class == BCDString,
|
37
|
-
"BCD of parsed integer has invalid class #{@bcd.class}"
|
38
|
-
end
|
39
|
-
|
40
|
-
Then 'Convert the simple BCD to an integer' do
|
41
|
-
assert @bcd.to_i == 12345,
|
42
|
-
"The integer that has been converted from BCD has invalid value"
|
43
|
-
end
|
44
|
-
|
45
|
-
Then 'Create a new bignum BCD string' do
|
46
|
-
@bcd = BCDString.new 12345098761029384756
|
47
|
-
assert @bcd == "\x56\x47\x38\x29\x10\x76\x98\x50\x34\x12"
|
48
|
-
.force_encoding( 'ASCII-8BIT' ),
|
49
|
-
"The BCD, which has been converted from Bignum integer, has invalid value"
|
50
|
-
end
|
51
|
-
|
52
|
-
Then 'Convert the BCD to a Bignum integer' do
|
53
|
-
bignum = @bcd.to_i
|
54
|
-
assert bignum.class == Bignum,
|
55
|
-
"BCD number converted has invalid class value '#{bignum.class}'"
|
56
|
-
assert bignum == 12345098761029384756,
|
57
|
-
"BCD number converted to integer has invalid value"
|
58
|
-
end
|
59
|
-
|
60
|
-
Then 'Try to create a BCD class with an erroneous argument' do
|
61
|
-
bcd_string = "\x56\x47\x38\x29\x10\x76\x98\x50\x34\xA2"
|
62
|
-
bcd_string.extend BCD
|
63
|
-
begin
|
64
|
-
assert bcd_string.to_i == 0,
|
65
|
-
"BCD string has been converted into an integer, that is wrong"
|
66
|
-
rescue BCD::ConvertError
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|