wwwjdic 15.0.0 → 16.0.0

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.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +13 -0
  3. data/Gemfile +4 -0
  4. data/README.md +6 -7
  5. data/Rakefile +4 -0
  6. data/examples/basics.rb +4 -0
  7. data/examples/translate.rb +26 -0
  8. data/examples/uri.rb +16 -0
  9. data/html/CHANGELOG.html +37 -30
  10. data/html/COPYING_md.html +22 -30
  11. data/html/Gemfile.html +25 -31
  12. data/html/Object.html +825 -63
  13. data/html/README_md.html +27 -33
  14. data/html/Rakefile.html +25 -31
  15. data/html/WWWJDic.html +42 -124
  16. data/html/WWWJDic/ParsableDuckType.html +35 -57
  17. data/html/WWWJDic/Parser.html +48 -90
  18. data/html/WWWJDic/Parsers.html +28 -36
  19. data/html/WWWJDic/Parsers/Dict.html +47 -73
  20. data/html/WWWJDic/Parsers/Display.html +42 -68
  21. data/html/WWWJDic/Parsers/Key.html +42 -68
  22. data/html/WWWJDic/Parsers/Search.html +38 -61
  23. data/html/WWWJDic/Parsers/Server.html +42 -68
  24. data/html/WWWJDic/Splitter.html +76 -173
  25. data/html/WWWJDic/Utils.html +28 -36
  26. data/html/WWWJDic/Utils/Downloader.html +28 -36
  27. data/html/WWWJDic/Utils/Downloader/Downloader.html +41 -80
  28. data/html/WWWJDic/Utils/Raisers.html +42 -96
  29. data/html/WWWJDic/WWWJDic.html +160 -342
  30. data/html/copyright_md.html +22 -30
  31. data/html/created.rid +32 -54
  32. data/html/css/rdoc.css +1 -1
  33. data/html/index.html +26 -51
  34. data/html/js/darkfish.js +84 -84
  35. data/html/js/navigation.js.gz +0 -0
  36. data/html/js/search.js +110 -110
  37. data/html/js/search_index.js +1 -1
  38. data/html/js/search_index.js.gz +0 -0
  39. data/html/js/searcher.js +229 -229
  40. data/html/js/searcher.js.gz +0 -0
  41. data/html/table_of_contents.html +153 -161
  42. data/lib/wwwjdic.rb +7 -4
  43. data/lib/wwwjdic/application.rb +52 -25
  44. data/lib/wwwjdic/constants.rb +33 -3
  45. data/lib/wwwjdic/locales/de.yml +2 -0
  46. data/lib/wwwjdic/locales/en.yml +2 -0
  47. data/lib/wwwjdic/locales/es.yml +2 -0
  48. data/lib/wwwjdic/locales/fr.yml +2 -0
  49. data/lib/wwwjdic/locales/hu.yml +2 -0
  50. data/lib/wwwjdic/locales/it.yml +2 -0
  51. data/lib/wwwjdic/locales/ja.yml +3 -1
  52. data/lib/wwwjdic/locales/nl.yml +2 -0
  53. data/lib/wwwjdic/locales/ru.yml +2 -0
  54. data/lib/wwwjdic/locales/sl.yml +2 -0
  55. data/lib/wwwjdic/locales/sv.yml +2 -0
  56. data/lib/wwwjdic/parser.rb +7 -4
  57. data/lib/wwwjdic/parsers/dict.rb +4 -1
  58. data/lib/wwwjdic/parsers/display.rb +4 -1
  59. data/lib/wwwjdic/parsers/key.rb +4 -1
  60. data/lib/wwwjdic/parsers/search.rb +4 -0
  61. data/lib/wwwjdic/parsers/server.rb +4 -1
  62. data/lib/wwwjdic/utils/downloader.rb +7 -8
  63. data/lib/wwwjdic/utils/raisers.rb +7 -13
  64. data/lib/wwwjdic/utils/splitter.rb +18 -9
  65. data/lib/wwwjdic/version.rb +5 -1
  66. data/test/test_helper.rb +4 -0
  67. data/test/test_wwwjdic.rb +4 -0
  68. data/test/wwwjdic/locales/de.yml +2 -0
  69. data/test/wwwjdic/locales/en.yml +2 -0
  70. data/test/wwwjdic/locales/es.yml +2 -0
  71. data/test/wwwjdic/locales/fr.yml +2 -0
  72. data/test/wwwjdic/locales/hu.yml +2 -0
  73. data/test/wwwjdic/locales/it.yml +2 -0
  74. data/test/wwwjdic/locales/ja.yml +2 -0
  75. data/test/wwwjdic/locales/nl.yml +2 -0
  76. data/test/wwwjdic/locales/ru.yml +2 -0
  77. data/test/wwwjdic/locales/sl.yml +2 -0
  78. data/test/wwwjdic/locales/sv.yml +2 -0
  79. data/test/wwwjdic/locales/test_locales.rb +35 -19
  80. data/test/wwwjdic/parsers/test_dict.rb +62 -36
  81. data/test/wwwjdic/parsers/test_display.rb +4 -0
  82. data/test/wwwjdic/parsers/test_key.rb +4 -0
  83. data/test/wwwjdic/parsers/test_server.rb +4 -0
  84. data/test/wwwjdic/test_application.rb +196 -148
  85. data/test/wwwjdic/test_parsable_duck_type.rb +4 -3
  86. data/test/wwwjdic/utils/test_downloader.rb +4 -0
  87. data/test/wwwjdic/utils/test_raisers.rb +42 -27
  88. data/wwwjdic.gemspec +14 -11
  89. metadata +19 -33
@@ -1,6 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #--
2
4
  # wwwjdic
5
+ # rubocop:disable Style/AsciiComments
3
6
  # © 2014 Marco Bresciani
7
+ # rubocop:enable Style/AsciiComments
4
8
  #
5
9
  # This file is part of wwwjdic.
6
10
  #
@@ -1,6 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #--
2
4
  # wwwjdic
5
+ # rubocop:disable Style/AsciiComments
3
6
  # © 2014 Marco Bresciani
7
+ # rubocop:enable Style/AsciiComments
4
8
  #
5
9
  # This file is part of wwwjdic.
6
10
  #
@@ -1,6 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #--
2
4
  # wwwjdic
5
+ # rubocop:disable Style/AsciiComments
3
6
  # © 2014 Marco Bresciani
7
+ # rubocop:enable Style/AsciiComments
4
8
  #
5
9
  # This file is part of wwwjdic.
6
10
  #
@@ -1,6 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #--
2
4
  # wwwjdic
5
+ # rubocop:disable Style/AsciiComments
3
6
  # © 2014 Marco Bresciani
7
+ # rubocop:enable Style/AsciiComments
4
8
  #
5
9
  # This file is part of wwwjdic.
6
10
  #
@@ -24,200 +28,244 @@
24
28
 
25
29
  require_relative '../test_helper'
26
30
 
27
- describe WWWJDic::WWWJDic do
28
- describe 'when created' do
31
+ def test_multilanguage(a_method)
32
+ describe 'when considering multiple languages' do
33
+ I18n.load_path = Dir[File.join(File.dirname(__FILE__), 'locales/', '*.yml')]
29
34
 
30
- subject { WWWJDic::WWWJDic.new(WWWJDic.parser) }
35
+ WWWJDic::AVAIL_LANGS.each_pair do |dict, number|
36
+ I18n.locale = dict.to_s
37
+ a_word = I18n.t('test.kotoba')
31
38
 
32
- # Basic checks for instance and default results
33
- it 'shall return a valid object' do
34
- _(subject).wont_be_nil
35
- _(subject).must_be_instance_of WWWJDic::WWWJDic
36
- end
39
+ it 'shall create a saved file with the proper filename' do
40
+ filename = "File_#{a_word}"
41
+ subject.send(a_method, a_word, nil, filename)
42
+ _(File.exist?(filename)).must_equal true
43
+ File.delete filename
44
+ end
37
45
 
38
- it 'shall return the URI with basic language' do
39
- _(subject.to_s).must_equal WWWJDic::TEST_REFERENCE_URI
40
- end
46
+ it "shall return the translated word '#{a_word}'" do
47
+ translation = subject.send(a_method, a_word, dict: WWWJDic::AVAIL_LANGS[dict])
48
+ _(translation).wont_be_nil
49
+ _(translation).wont_be_empty
41
50
 
42
- # Tests for server selection
43
- describe 'when selecting a server' do
44
- describe 'when an invalid server is selected' do
45
- ['', nil, :invalid].each do |a_server|
46
- it 'shall raise an error' do
47
- assert_raises ArgumentError do
48
- subject.server = a_server
49
- end
50
- end
51
+ if a_method == :json_translate
52
+ _(JSON.parse(translation)).wont_include '<TITLE>'
53
+ _(JSON.parse(translation)).wont_include '<pre>'
54
+ _(JSON.parse(translation).keys).must_include a_word
51
55
 
52
- it 'shall return the reference URI' do
53
- _(subject.to_s).must_equal WWWJDic::TEST_REFERENCE_URI
54
- end
55
- end
56
- end
56
+ an_uri = subject.raw_uri(a_word, dict: WWWJDic::AVAIL_LANGS[dict])
57
+ _(an_uri).must_include number
57
58
 
58
- WWWJDic::URIS.each do |name, uri|
59
- describe "when server '#{name}' is selected" do
60
- it "shall return the proper '#{uri}'" do
61
- subject.server = name
62
- _(subject.server).must_equal uri
63
- _(subject.to_s).must_include uri
64
- end
59
+ _(JSON.parse(translation)[a_word]).must_equal an_uri
65
60
  end
66
61
  end
67
62
  end
63
+ end
64
+ end
68
65
 
69
- # Tests for dictionary selection
70
- describe 'when selecting a dictionary' do
71
- ['', nil].each do |a_dict|
72
- describe "when an invalid dictionary '#{a_dict}' is selected" do
73
- it 'shall raise an error' do
66
+ def test_get_translation
67
+ describe 'when asking to retrieve a translation' do
68
+ %i[translate json_translate].each do |a_method|
69
+ describe "when the translation is '#{a_method}'" do
70
+ ['', nil].each do |a_word|
71
+ it "shall raise ArgumentError when an invalid word '#{a_word}' is proposed" do
74
72
  assert_raises ArgumentError do
75
- subject.dictionary = a_dict
73
+ subject.send(a_method, a_word)
76
74
  end
77
75
  end
78
-
79
- it 'shall return the reference URI' do
80
- _(subject.to_s).must_equal WWWJDic::TEST_REFERENCE_URI
81
- end
82
76
  end
77
+
78
+ test_multilanguage(a_method)
83
79
  end
80
+ end
81
+ end
82
+ end
84
83
 
85
- WWWJDic::DICTIONARY_CODES.each do |dict_number|
86
- describe "when dictionary '#{dict_number}' is selected" do
87
- it "shall return the proper number '#{dict_number}'" do
88
- subject.dictionary = dict_number
89
- _(subject.dictionary).must_equal WWWJDic::DICTS_BY_CODES[dict_number]
90
- _(subject.to_s).must_equal WWWJDic::URI_DEFAULT + dict_number + WWWJDic::DISPLAY[:regular]
84
+ def test_get_dictionary
85
+ describe 'when selecting a dictionary' do
86
+ ['', nil].each do |a_dict|
87
+ describe "when an invalid dictionary '#{a_dict}' is selected" do
88
+ it 'shall raise an error' do
89
+ assert_raises ArgumentError do
90
+ subject.dictionary = a_dict
91
91
  end
92
92
  end
93
- end
94
93
 
95
- it 'shall return the URI with basic dictionary when reset' do
96
- subject.dictionary = 'R'
97
- subject.reset
98
- _(subject.to_s).must_equal WWWJDic::TEST_REFERENCE_URI
99
- _(subject.dictionary).must_equal WWWJDic::DICTIONARY_NAMES[0]
94
+ test_return_test_reference
100
95
  end
96
+ end
101
97
 
102
- WWWJDic::DICTIONARY_NAMES.each do |dict_name|
103
- describe "when dictionary '#{dict_name}' is selected" do
104
- it "shall return the proper name '#{dict_name}'" do
105
- subject.dictionary = dict_name
106
- _(subject.dictionary).must_equal dict_name
107
- _(subject.to_s).must_equal WWWJDic::URI_DEFAULT + WWWJDic::DICTS_BY_NAMES[dict_name] + WWWJDic::DISPLAY[:regular]
108
- end
98
+ WWWJDic::DICTIONARY_CODES.each do |dict_number|
99
+ describe "when dictionary '#{dict_number}' is selected" do
100
+ it "shall return the proper number '#{dict_number}'" do
101
+ subject.dictionary = dict_number
102
+ _(subject.dictionary).must_equal WWWJDic::DICTS_BY_CODES[dict_number]
103
+ _(subject.to_s).must_equal WWWJDic::URI_DEFAULT + dict_number + WWWJDic::DISPLAY[:regular]
109
104
  end
110
105
  end
111
-
112
- it 'shall return the URI with basic dictionary when reset' do
113
- subject.dictionary = 'Japanese-Italian'
114
- subject.reset
115
- _(subject.to_s).must_equal WWWJDic::TEST_REFERENCE_URI
116
- _(subject.dictionary).must_equal WWWJDic::DICTIONARY_NAMES[0]
117
- end
118
106
  end
119
107
 
120
- # Tests for translations
121
- describe 'when asking for a translation' do
122
- I18n.load_path = Dir[File.join(File.dirname(__FILE__), '/locales/', '*.yml')]
108
+ it 'shall return the URI with basic dictionary when reset' do
109
+ subject.dictionary = 'R'
110
+ subject.reset
111
+ _(subject.to_s).must_equal WWWJDic::TEST_REFERENCE_URI
112
+ _(subject.dictionary).must_equal WWWJDic::DICTIONARY_NAMES[0]
113
+ end
123
114
 
124
- # Tests for translation URIs
125
- describe 'when asking for URI' do
126
- ['', nil].each do |a_word|
127
- describe "when providing an invalid parameter '#{a_word}'" do
128
- %i[uri raw_uri json_uri].each do |a_method|
129
- it "shall raise an error for #{a_method} request" do
130
- assert_raises ArgumentError do
131
- subject.send a_method
132
- end
133
- end
134
- end
135
- end
115
+ WWWJDic::DICTIONARY_NAMES.each do |dict_name|
116
+ describe "when dictionary '#{dict_name}' is selected" do
117
+ it "shall return the proper name '#{dict_name}'" do
118
+ subject.dictionary = dict_name
119
+ _(subject.dictionary).must_equal dict_name
120
+ _(subject.to_s).must_equal WWWJDic::URI_DEFAULT +
121
+ WWWJDic::DICTS_BY_NAMES[dict_name] +
122
+ WWWJDic::DISPLAY[:regular]
136
123
  end
124
+ end
125
+ end
137
126
 
138
- describe 'when considering multiple languages' do
139
- WWWJDic::AVAIL_LANGS.each_pair do |dict, number|
140
- I18n.locale = dict.to_s
141
- a_word = I18n.t('test.kotoba')
127
+ it 'shall return the URI with basic dictionary when reset' do
128
+ subject.dictionary = 'Japanese-Italian'
129
+ subject.reset
130
+ _(subject.to_s).must_equal WWWJDic::TEST_REFERENCE_URI
131
+ _(subject.dictionary).must_equal WWWJDic::DICTIONARY_NAMES[0]
132
+ end
133
+ end
134
+ end
142
135
 
143
- %i[uri raw_uri json_uri].each do |a_method|
144
- it "shall return URI containing '#{number}' for a '#{dict}' word for '#{a_method}' request" do
145
- _(subject.send(a_method, a_word, dict: WWWJDic::AVAIL_LANGS[dict])).must_include number
146
- end
136
+ def test_return_json(a_word, dict)
137
+ it "shall return correct JSON data containing '#{a_word}' and the proper URI" do
138
+ json = subject.json_uri(a_word, dict: WWWJDic::AVAIL_LANGS[dict])
139
+ an_uri = subject.uri(a_word, dict: WWWJDic::AVAIL_LANGS[dict])
147
140
 
148
- it "shall return URI containing '#{a_word}' for a '#{dict}' word for '#{a_method}' request" do
149
- _(subject.send(a_method, a_word, dict: WWWJDic::AVAIL_LANGS[dict])).must_include CGI.escape(a_word).to_s
150
- end
151
- end
141
+ _(JSON.parse(json).keys).must_include a_word
142
+ _(JSON.parse(json)[a_word]).must_equal an_uri
143
+ end
144
+ end
152
145
 
153
- it 'shall override user-custom display parameter for raw display' do
154
- _(subject.raw_uri(a_word, display: :regular, dict: WWWJDic::AVAIL_LANGS[dict])).must_include WWWJDic::DISPLAY[:raw]
155
- end
146
+ def test_override_custom_params(a_word, dict)
147
+ it 'shall override user-custom display parameter for raw display' do
148
+ _(subject.raw_uri(a_word, display: :regular,
149
+ dict: WWWJDic::AVAIL_LANGS[dict])).must_include WWWJDic::DISPLAY[:raw]
150
+ end
151
+ end
156
152
 
157
- it "shall return correct JSON data containing '#{a_word}' and the proper URI" do
158
- json = subject.json_uri(a_word, dict: WWWJDic::AVAIL_LANGS[dict])
159
- an_uri = subject.uri(a_word, dict: WWWJDic::AVAIL_LANGS[dict])
153
+ def test_multiple_languages
154
+ describe 'when considering multiple languages' do
155
+ WWWJDic::AVAIL_LANGS.each_pair do |dict, number|
156
+ I18n.locale = dict.to_s
157
+ a_word = I18n.t('test.kotoba')
160
158
 
161
- _(JSON.parse(json).keys).must_include a_word
162
- _(JSON.parse(json)[a_word]).must_equal an_uri
163
- end
164
- end
159
+ %i[uri raw_uri json_uri].each do |a_method|
160
+ it "shall return URI containing '#{number}' for a '#{dict}' word for '#{a_method}' request" do
161
+ _(subject.send(a_method, a_word, dict: WWWJDic::AVAIL_LANGS[dict])).must_include number
162
+ _(subject.send(a_method, a_word, dict: WWWJDic::AVAIL_LANGS[dict])).must_include CGI.escape(a_word).to_s
165
163
  end
166
164
  end
167
- end
168
165
 
169
- # Tests for translation URIs
170
- describe 'when asking to retrieve a translation' do
171
- %i[translate json_translate].each do |a_method|
172
- describe "when the translation is '#{a_method}'" do
173
- ['', nil].each do |a_word|
174
- it "shall raise ArgumentError when an invalid word '#{a_word}' is proposed" do
175
- assert_raises ArgumentError do
176
- subject.send(a_method, a_word)
177
- end
178
- end
166
+ test_override_custom_params(a_word, dict)
179
167
 
180
- it "shall raise ArgumentError when an invalid word '#{a_word}' is proposed, for raw display" do
181
- assert_raises ArgumentError do
182
- subject.send(a_method, a_word)
183
- end
184
- end
185
- end
168
+ test_return_json(a_word, dict)
169
+ end
170
+ end
171
+ end
186
172
 
187
- describe 'when considering multiple languages' do
188
- I18n.load_path = Dir[File.join(File.dirname(__FILE__), 'locales/', '*.yml')]
173
+ def test_raise_invalid_server_error(a_server)
174
+ it 'shall raise an error' do
175
+ assert_raises ArgumentError do
176
+ subject.server = a_server
177
+ end
178
+ end
179
+ end
189
180
 
190
- WWWJDic::AVAIL_LANGS.each_pair do |dict, number|
191
- I18n.locale = dict.to_s
192
- a_word = I18n.t('test.kotoba')
181
+ def test_return_test_reference
182
+ it 'shall return the reference URI' do
183
+ _(subject.to_s).must_equal WWWJDic::TEST_REFERENCE_URI
184
+ end
185
+ end
186
+
187
+ def test_invalid_server
188
+ describe 'when an invalid server is selected' do
189
+ ['', nil, :invalid].each do |a_server|
190
+ test_raise_invalid_server_error(a_server)
193
191
 
194
- it 'shall create a saved file with the proper filename' do
195
- filename = "File_#{a_word}"
196
- subject.send(a_method, a_word, nil, filename)
197
- _(File.exist?(filename)).must_equal true
198
- File.delete filename
199
- end
192
+ test_return_test_reference
193
+ end
194
+ end
195
+ end
200
196
 
201
- it "shall return the translated word '#{a_word}'" do
202
- translation = subject.send(a_method, a_word, dict: WWWJDic::AVAIL_LANGS[dict])
203
- _(translation).wont_be_nil
204
- _(translation).wont_be_empty
197
+ def test_server
198
+ WWWJDic::URIS.each do |name, uri|
199
+ describe "when server '#{name}' is selected" do
200
+ it "shall return the proper '#{uri}'" do
201
+ subject.server = name
202
+ _(subject.server).must_equal uri
203
+ _(subject.to_s).must_include uri
204
+ end
205
+ end
206
+ end
207
+ end
205
208
 
206
- if a_method == :json_translate
207
- _(JSON.parse(translation)).wont_include '<TITLE>'
208
- _(JSON.parse(translation)).wont_include '<pre>'
209
- _(JSON.parse(translation).keys).must_include a_word
209
+ def test_select_server
210
+ describe 'when selecting a server' do
211
+ test_invalid_server
210
212
 
211
- an_uri = subject.raw_uri(a_word, dict: WWWJDic::AVAIL_LANGS[dict])
212
- _(an_uri).must_include number
213
+ test_server
214
+ end
215
+ end
213
216
 
214
- _(JSON.parse(translation)[a_word]).must_equal an_uri
215
- end
216
- end
217
- end
218
- end
217
+ def test_invalid_parameter(a_word)
218
+ describe "when providing an invalid parameter '#{a_word}'" do
219
+ %i[uri raw_uri json_uri].each do |a_method|
220
+ it "shall raise an error for #{a_method} request" do
221
+ assert_raises ArgumentError do
222
+ subject.send a_method
219
223
  end
220
224
  end
221
225
  end
222
226
  end
223
227
  end
228
+
229
+ def test_ask_uri
230
+ describe 'when asking for URI' do
231
+ ['', nil].each(&method(:test_invalid_parameter))
232
+
233
+ test_multiple_languages
234
+ end
235
+ end
236
+
237
+ def test_ask_translation
238
+ describe 'when asking for a translation' do
239
+ I18n.load_path = Dir[File.join(File.dirname(__FILE__), './locales/', '*.yml')]
240
+
241
+ # Tests for translation URIs
242
+ test_ask_uri
243
+ end
244
+ end
245
+
246
+ describe WWWJDic::WWWJDic do
247
+ describe 'when created' do
248
+ subject { WWWJDic::WWWJDic.new(WWWJDic.parser) }
249
+
250
+ # Basic checks for instance and default results
251
+ it 'shall return a valid object' do
252
+ _(subject).wont_be_nil
253
+ _(subject).must_be_instance_of WWWJDic::WWWJDic
254
+ end
255
+
256
+ it 'shall return the URI with basic language' do
257
+ _(subject.to_s).must_equal WWWJDic::TEST_REFERENCE_URI
258
+ end
259
+
260
+ # Tests for server selection
261
+ test_select_server
262
+
263
+ # Tests for dictionary selection
264
+ test_get_dictionary
265
+
266
+ # Tests for translations
267
+ test_ask_translation
268
+
269
+ test_get_translation
270
+ end
271
+ end
@@ -1,7 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #--
2
4
  # wwwjdic
5
+ # rubocop:disable Style/AsciiComments
3
6
  # © 2014 Marco Bresciani
4
- #
7
+ # rubocop:enable Style/AsciiComments
5
8
  # This file is part of wwwjdic.
6
9
  #
7
10
  # wwwjdic is free software: you can redistribute it and/or modify it
@@ -23,7 +26,6 @@
23
26
  #++
24
27
 
25
28
  module WWWJDic
26
-
27
29
  # This module represents the parsable duck type element for testing
28
30
  # purposes.
29
31
  #
@@ -31,7 +33,6 @@ module WWWJDic
31
33
  # Copyright:: Copyright (C) 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
32
34
  # License:: GNU General Public License version 3
33
35
  module ParsableDuckType
34
-
35
36
  # The method that tests the parsable duck type interface and its
36
37
  # +parse+ method.
37
38
  def test_parsable_duck_type