bukkit-api 0.0.1.pre.99

Sign up to get free protection for your applications and to get access to all the features.
Files changed (233) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +22 -0
  3. data/.travis.yml +46 -0
  4. data/Gemfile +8 -0
  5. data/LICENSE.txt +674 -0
  6. data/README.md +25 -0
  7. data/Rakefile +8 -0
  8. data/bukkit-api.gemspec +26 -0
  9. data/lib/bukkit.rb +23 -0
  10. data/lib/bukkit/achievement.rb +84 -0
  11. data/lib/bukkit/achievement/acquire_iron.rb +15 -0
  12. data/lib/bukkit/achievement/bake_cake.rb +15 -0
  13. data/lib/bukkit/achievement/bookcase.rb +15 -0
  14. data/lib/bukkit/achievement/breed_cow.rb +15 -0
  15. data/lib/bukkit/achievement/brew_potion.rb +15 -0
  16. data/lib/bukkit/achievement/build_better_pickaxe.rb +15 -0
  17. data/lib/bukkit/achievement/build_furnace.rb +15 -0
  18. data/lib/bukkit/achievement/build_hoe.rb +15 -0
  19. data/lib/bukkit/achievement/build_pickaxe.rb +15 -0
  20. data/lib/bukkit/achievement/build_sword.rb +15 -0
  21. data/lib/bukkit/achievement/build_workbench.rb +15 -0
  22. data/lib/bukkit/achievement/cook_fish.rb +15 -0
  23. data/lib/bukkit/achievement/diamonds_to_you.rb +15 -0
  24. data/lib/bukkit/achievement/enchantments.rb +15 -0
  25. data/lib/bukkit/achievement/end_portal.rb +15 -0
  26. data/lib/bukkit/achievement/explore_all_biomes.rb +15 -0
  27. data/lib/bukkit/achievement/fly_pig.rb +15 -0
  28. data/lib/bukkit/achievement/full_beacon.rb +15 -0
  29. data/lib/bukkit/achievement/get_blaze_rod.rb +15 -0
  30. data/lib/bukkit/achievement/get_diamonds.rb +15 -0
  31. data/lib/bukkit/achievement/ghast_return.rb +15 -0
  32. data/lib/bukkit/achievement/kill_cow.rb +15 -0
  33. data/lib/bukkit/achievement/kill_enemy.rb +15 -0
  34. data/lib/bukkit/achievement/kill_wither.rb +15 -0
  35. data/lib/bukkit/achievement/make_bread.rb +15 -0
  36. data/lib/bukkit/achievement/mine_wood.rb +15 -0
  37. data/lib/bukkit/achievement/nether_portal.rb +15 -0
  38. data/lib/bukkit/achievement/on_a_rail.rb +15 -0
  39. data/lib/bukkit/achievement/open_inventory.rb +12 -0
  40. data/lib/bukkit/achievement/overkill.rb +15 -0
  41. data/lib/bukkit/achievement/snipe_skeleton.rb +15 -0
  42. data/lib/bukkit/achievement/spawn_wither.rb +15 -0
  43. data/lib/bukkit/achievement/the_end.rb +15 -0
  44. data/lib/bukkit/art.rb +88 -0
  45. data/lib/bukkit/art/alban.rb +15 -0
  46. data/lib/bukkit/art/aztec.rb +15 -0
  47. data/lib/bukkit/art/aztec2.rb +15 -0
  48. data/lib/bukkit/art/bomb.rb +15 -0
  49. data/lib/bukkit/art/burningskull.rb +15 -0
  50. data/lib/bukkit/art/bust.rb +15 -0
  51. data/lib/bukkit/art/courbet.rb +15 -0
  52. data/lib/bukkit/art/creebet.rb +15 -0
  53. data/lib/bukkit/art/donkeykong.rb +15 -0
  54. data/lib/bukkit/art/fighters.rb +15 -0
  55. data/lib/bukkit/art/graham.rb +15 -0
  56. data/lib/bukkit/art/kebab.rb +15 -0
  57. data/lib/bukkit/art/match.rb +15 -0
  58. data/lib/bukkit/art/pigscene.rb +15 -0
  59. data/lib/bukkit/art/plant.rb +15 -0
  60. data/lib/bukkit/art/pointer.rb +15 -0
  61. data/lib/bukkit/art/pool.rb +15 -0
  62. data/lib/bukkit/art/sea.rb +15 -0
  63. data/lib/bukkit/art/skeleton.rb +15 -0
  64. data/lib/bukkit/art/skull_and_roses.rb +15 -0
  65. data/lib/bukkit/art/stage.rb +15 -0
  66. data/lib/bukkit/art/sunset.rb +15 -0
  67. data/lib/bukkit/art/void.rb +15 -0
  68. data/lib/bukkit/art/wanderer.rb +15 -0
  69. data/lib/bukkit/art/wasteland.rb +15 -0
  70. data/lib/bukkit/art/wither.rb +15 -0
  71. data/lib/bukkit/ban_entry.rb +33 -0
  72. data/lib/bukkit/ban_list.rb +58 -0
  73. data/lib/bukkit/block.rb +11 -0
  74. data/lib/bukkit/block/beacon.rb +11 -0
  75. data/lib/bukkit/block/biome.rb +11 -0
  76. data/lib/bukkit/block/block_face.rb +11 -0
  77. data/lib/bukkit/block/block_state.rb +11 -0
  78. data/lib/bukkit/block/brewing_stand.rb +11 -0
  79. data/lib/bukkit/block/chest.rb +11 -0
  80. data/lib/bukkit/block/command_block.rb +11 -0
  81. data/lib/bukkit/block/container_block.rb +11 -0
  82. data/lib/bukkit/block/creature_spawner.rb +11 -0
  83. data/lib/bukkit/block/dispenser.rb +11 -0
  84. data/lib/bukkit/block/double_chest.rb +11 -0
  85. data/lib/bukkit/block/dropper.rb +11 -0
  86. data/lib/bukkit/block/furnace.rb +11 -0
  87. data/lib/bukkit/block/hopper.rb +11 -0
  88. data/lib/bukkit/block/jukebox.rb +11 -0
  89. data/lib/bukkit/block/note_block.rb +11 -0
  90. data/lib/bukkit/block/piston_move_retraction.rb +11 -0
  91. data/lib/bukkit/block/sign.rb +11 -0
  92. data/lib/bukkit/block/skull.rb +11 -0
  93. data/lib/bukkit/block_change_delegate.rb +24 -0
  94. data/lib/bukkit/chat_color.rb +7 -0
  95. data/lib/bukkit/chunk.rb +7 -0
  96. data/lib/bukkit/chunk_snapshot.rb +7 -0
  97. data/lib/bukkit/coal_type.rb +7 -0
  98. data/lib/bukkit/color.rb +7 -0
  99. data/lib/bukkit/command.rb +11 -0
  100. data/lib/bukkit/command/block_command_sender.rb +11 -0
  101. data/lib/bukkit/command/command_exception.rb +11 -0
  102. data/lib/bukkit/command/command_map.rb +11 -0
  103. data/lib/bukkit/command/command_sender.rb +11 -0
  104. data/lib/bukkit/command/console_command_sender.rb +11 -0
  105. data/lib/bukkit/command/defaults.rb +15 -0
  106. data/lib/bukkit/command/defaults/achievement_command.rb +15 -0
  107. data/lib/bukkit/command/defaults/ban_command.rb +15 -0
  108. data/lib/bukkit/command/defaults/ban_ip_command.rb +15 -0
  109. data/lib/bukkit/command/defaults/ban_list_command.rb +15 -0
  110. data/lib/bukkit/command/defaults/bukkit_command.rb +15 -0
  111. data/lib/bukkit/command/defaults/clear_command.rb +15 -0
  112. data/lib/bukkit/command/defaults/default_game_mode_command.rb +15 -0
  113. data/lib/bukkit/command/defaults/deop_command.rb +15 -0
  114. data/lib/bukkit/command/defaults/difficulty_command.rb +15 -0
  115. data/lib/bukkit/command/defaults/effect_command.rb +15 -0
  116. data/lib/bukkit/command/defaults/enchant_command.rb +15 -0
  117. data/lib/bukkit/command/defaults/exp_command.rb +15 -0
  118. data/lib/bukkit/command/defaults/game_mode_command.rb +15 -0
  119. data/lib/bukkit/command/defaults/game_rule_command.rb +15 -0
  120. data/lib/bukkit/command/defaults/give_command.rb +15 -0
  121. data/lib/bukkit/command/defaults/help_command.rb +15 -0
  122. data/lib/bukkit/command/defaults/kick_command.rb +15 -0
  123. data/lib/bukkit/command/defaults/kill_command.rb +15 -0
  124. data/lib/bukkit/command/defaults/list_command.rb +15 -0
  125. data/lib/bukkit/command/defaults/me_command.rb +15 -0
  126. data/lib/bukkit/command/defaults/op_command.rb +15 -0
  127. data/lib/bukkit/command/defaults/pardon_command.rb +15 -0
  128. data/lib/bukkit/command/defaults/pardon_ip_command.rb +15 -0
  129. data/lib/bukkit/command/defaults/play_sound_command.rb +15 -0
  130. data/lib/bukkit/command/defaults/plugins_command.rb +15 -0
  131. data/lib/bukkit/command/defaults/reload_command.rb +15 -0
  132. data/lib/bukkit/command/defaults/save_command.rb +15 -0
  133. data/lib/bukkit/command/defaults/save_off_command.rb +15 -0
  134. data/lib/bukkit/command/defaults/say_command.rb +15 -0
  135. data/lib/bukkit/command/defaults/scoreboard_command.rb +15 -0
  136. data/lib/bukkit/command/defaults/seed_command.rb +15 -0
  137. data/lib/bukkit/command/defaults/set_idle_timeout_command.rb +15 -0
  138. data/lib/bukkit/command/defaults/set_world_spawn_command.rb +15 -0
  139. data/lib/bukkit/command/defaults/spawnpoint_command.rb +15 -0
  140. data/lib/bukkit/command/defaults/spread_players_command.rb +15 -0
  141. data/lib/bukkit/command/defaults/stop_command.rb +15 -0
  142. data/lib/bukkit/command/defaults/teleport_command.rb +15 -0
  143. data/lib/bukkit/command/defaults/tell_command.rb +15 -0
  144. data/lib/bukkit/command/defaults/test_for_command.rb +15 -0
  145. data/lib/bukkit/command/defaults/time_command.rb +15 -0
  146. data/lib/bukkit/command/defaults/timings_command.rb +15 -0
  147. data/lib/bukkit/command/defaults/toggle_downfall_command.rb +15 -0
  148. data/lib/bukkit/command/defaults/vanilla_command.rb +15 -0
  149. data/lib/bukkit/command/defaults/version_command.rb +15 -0
  150. data/lib/bukkit/command/defaults/weather_command.rb +15 -0
  151. data/lib/bukkit/command/defaults/whitelist_command.rb +15 -0
  152. data/lib/bukkit/command/formatted_command_alias.rb +11 -0
  153. data/lib/bukkit/command/multiple_command_alias.rb +11 -0
  154. data/lib/bukkit/command/plugin_command.rb +11 -0
  155. data/lib/bukkit/command/plugin_command_yaml_parser.rb +11 -0
  156. data/lib/bukkit/command/plugin_identifiable_command.rb +11 -0
  157. data/lib/bukkit/command/remote_console_command_sender.rb +11 -0
  158. data/lib/bukkit/command/simple_command_map.rb +11 -0
  159. data/lib/bukkit/command/tab_command_executor.rb +11 -0
  160. data/lib/bukkit/command/tab_completer.rb +11 -0
  161. data/lib/bukkit/command/tab_executor.rb +11 -0
  162. data/lib/bukkit/configuration.rb +11 -0
  163. data/lib/bukkit/configuration/configuration_options.rb +11 -0
  164. data/lib/bukkit/configuration/configuration_section.rb +11 -0
  165. data/lib/bukkit/configuration/file.rb +15 -0
  166. data/lib/bukkit/configuration/file/file_configuration.rb +15 -0
  167. data/lib/bukkit/configuration/file/file_configuration_options.rb +15 -0
  168. data/lib/bukkit/configuration/file/yaml_configuration.rb +15 -0
  169. data/lib/bukkit/configuration/file/yaml_configuration_options.rb +15 -0
  170. data/lib/bukkit/configuration/file/yaml_constructor.rb +15 -0
  171. data/lib/bukkit/configuration/file/yaml_representer.rb +15 -0
  172. data/lib/bukkit/configuration/invalid_configuration_exception.rb +11 -0
  173. data/lib/bukkit/configuration/memory_configuration.rb +11 -0
  174. data/lib/bukkit/configuration/memory_section.rb +11 -0
  175. data/lib/bukkit/configuration/serialization.rb +15 -0
  176. data/lib/bukkit/configuration/serialization/configuration_seriablization.rb +15 -0
  177. data/lib/bukkit/configuration/serialization/configuration_serializable.rb +15 -0
  178. data/lib/bukkit/configuration/serialization/delegate_deserialization.rb +15 -0
  179. data/lib/bukkit/configuration/serialization/serializable_as.rb +15 -0
  180. data/lib/bukkit/crop_state.rb +7 -0
  181. data/lib/bukkit/difficulty.rb +7 -0
  182. data/lib/bukkit/dye_color.rb +7 -0
  183. data/lib/bukkit/effect.rb +7 -0
  184. data/lib/bukkit/enchantment.rb +11 -0
  185. data/lib/bukkit/enchantments/enchantment_target.rb +11 -0
  186. data/lib/bukkit/enchantments/enchantment_wrapper.rb +11 -0
  187. data/lib/bukkit/entity_effect.rb +7 -0
  188. data/lib/bukkit/firework_effect.rb +7 -0
  189. data/lib/bukkit/game_mode.rb +7 -0
  190. data/lib/bukkit/game_species.rb +7 -0
  191. data/lib/bukkit/instrument.rb +7 -0
  192. data/lib/bukkit/location.rb +7 -0
  193. data/lib/bukkit/material.rb +7 -0
  194. data/lib/bukkit/nether_warts_state.rb +7 -0
  195. data/lib/bukkit/note.rb +7 -0
  196. data/lib/bukkit/offline_player.rb +7 -0
  197. data/lib/bukkit/plugin/messaging/plugin_message_recipient.rb +11 -0
  198. data/lib/bukkit/portal_type.rb +7 -0
  199. data/lib/bukkit/rotation.rb +7 -0
  200. data/lib/bukkit/sandstone_type.rb +7 -0
  201. data/lib/bukkit/server.rb +41 -0
  202. data/lib/bukkit/server/commands.rb +23 -0
  203. data/lib/bukkit/server/config.rb +20 -0
  204. data/lib/bukkit/server/info.rb +38 -0
  205. data/lib/bukkit/server/network.rb +58 -0
  206. data/lib/bukkit/server/players.rb +44 -0
  207. data/lib/bukkit/server/processing.rb +53 -0
  208. data/lib/bukkit/server/recipes.rb +23 -0
  209. data/lib/bukkit/server/whitelist.rb +23 -0
  210. data/lib/bukkit/server/world.rb +47 -0
  211. data/lib/bukkit/skull_type.rb +7 -0
  212. data/lib/bukkit/sound.rb +7 -0
  213. data/lib/bukkit/statistic.rb +7 -0
  214. data/lib/bukkit/travel_agent.rb +7 -0
  215. data/lib/bukkit/tree_species.rb +7 -0
  216. data/lib/bukkit/tree_type.rb +7 -0
  217. data/lib/bukkit/unsafe_values.rb +7 -0
  218. data/lib/bukkit/utility.rb +7 -0
  219. data/lib/bukkit/version.rb +3 -0
  220. data/lib/bukkit/warning.rb +7 -0
  221. data/lib/bukkit/weather_type.rb +7 -0
  222. data/lib/bukkit/world.rb +7 -0
  223. data/lib/bukkit/world_creator.rb +7 -0
  224. data/lib/bukkit/world_type.rb +50 -0
  225. data/lib/bukkit/world_type/amplified.rb +15 -0
  226. data/lib/bukkit/world_type/flat.rb +15 -0
  227. data/lib/bukkit/world_type/large_biomes.rb +15 -0
  228. data/lib/bukkit/world_type/normal.rb +15 -0
  229. data/lib/bukkit/world_type/version_1_1.rb +15 -0
  230. data/spec/lib/achievement_spec.rb +383 -0
  231. data/spec/lib/art_spec.rb +566 -0
  232. data/spec/spec_helper.rb +17 -0
  233. metadata +336 -0
@@ -0,0 +1,566 @@
1
+ require 'spec_helper'
2
+
3
+ describe Bukkit::Art do
4
+ before :each do
5
+ @art = Bukkit::Art
6
+ end
7
+
8
+ it do
9
+ expect(@art).to be
10
+ end
11
+
12
+ it do
13
+ expect(@art).to be_truthy
14
+ end
15
+
16
+ it do
17
+ expect(@art).to_not be_falsey
18
+ end
19
+
20
+ it do
21
+ expect(@art).to_not be_nil
22
+ end
23
+
24
+ it do
25
+ expect(@art).to be_an Object
26
+ end
27
+
28
+ context 'when id, width, and height and defined as zero' do
29
+ before :each do
30
+ @initialized = @art.new 0, 0, 0
31
+ end
32
+
33
+ context '#new(0, 0, 0)' do
34
+ it do
35
+ expect(@initialized).to be
36
+ end
37
+
38
+ it do
39
+ expect(@initialized).to be_truthy
40
+ end
41
+
42
+ it do
43
+ expect(@initialized).to_not be_falsey
44
+ end
45
+
46
+ it do
47
+ expect(@initialized).to_not be_nil
48
+ end
49
+
50
+ it do
51
+ expect(@initialized).to be_a Bukkit::Art
52
+ end
53
+ end
54
+
55
+ context '#id' do
56
+ before :each do
57
+ @id = @initialized.id
58
+ end
59
+
60
+ it do
61
+ expect(@id).to be
62
+ end
63
+
64
+ it do
65
+ expect(@id).to be_truthy
66
+ end
67
+
68
+ it do
69
+ expect(@id).to_not be_falsey
70
+ end
71
+
72
+ it do
73
+ expect(@id).to_not be_nil
74
+ end
75
+
76
+ it do
77
+ expect(@id).to be_an Integer
78
+ end
79
+
80
+ it do
81
+ expect(@id).to be 0
82
+ end
83
+ end
84
+
85
+ context '#width' do
86
+ before :each do
87
+ @width = @initialized.width
88
+ end
89
+
90
+ it do
91
+ expect(@width).to be
92
+ end
93
+
94
+ it do
95
+ expect(@width).to be_truthy
96
+ end
97
+
98
+ it do
99
+ expect(@width).to_not be_falsey
100
+ end
101
+
102
+ it do
103
+ expect(@width).to_not be_nil
104
+ end
105
+
106
+ it do
107
+ expect(@width).to be_an Integer
108
+ end
109
+
110
+ it do
111
+ expect(@width).to be 0
112
+ end
113
+ end
114
+
115
+ context '#getBlockWidth' do
116
+ before :each do
117
+ @width = @initialized.getBlockWidth
118
+ end
119
+
120
+ it do
121
+ expect(@width).to be
122
+ end
123
+
124
+ it do
125
+ expect(@width).to be_truthy
126
+ end
127
+
128
+ it do
129
+ expect(@width).to_not be_falsey
130
+ end
131
+
132
+ it do
133
+ expect(@width).to_not be_nil
134
+ end
135
+
136
+ it do
137
+ expect(@width).to be_an Integer
138
+ end
139
+
140
+ it do
141
+ expect(@width).to be 0
142
+ end
143
+ end
144
+
145
+ context '#height' do
146
+ before :each do
147
+ @height = @initialized.height
148
+ end
149
+
150
+ it do
151
+ expect(@height).to be
152
+ end
153
+
154
+ it do
155
+ expect(@height).to be_truthy
156
+ end
157
+
158
+ it do
159
+ expect(@height).to_not be_falsey
160
+ end
161
+
162
+ it do
163
+ expect(@height).to_not be_nil
164
+ end
165
+
166
+ it do
167
+ expect(@height).to be_an Integer
168
+ end
169
+
170
+ it do
171
+ expect(@height).to be 0
172
+ end
173
+ end
174
+
175
+ context '#getBlockHeight' do
176
+ before :each do
177
+ @height = @initialized.getBlockHeight
178
+ end
179
+
180
+ it do
181
+ expect(@height).to be
182
+ end
183
+
184
+ it do
185
+ expect(@height).to be_truthy
186
+ end
187
+
188
+ it do
189
+ expect(@height).to_not be_falsey
190
+ end
191
+
192
+ it do
193
+ expect(@height).to_not be_nil
194
+ end
195
+
196
+ it do
197
+ expect(@height).to be_an Integer
198
+ end
199
+
200
+ it do
201
+ expect(@height).to be 0
202
+ end
203
+ end
204
+ end
205
+
206
+ art = {
207
+ 'kebab' => Bukkit::Art::Kebab,
208
+ 'aztec' => Bukkit::Art::Aztec,
209
+ 'alban' => Bukkit::Art::Alban,
210
+ 'aztec2' => Bukkit::Art::Aztec2,
211
+ 'bomb' => Bukkit::Art::Bomb,
212
+ 'plant' => Bukkit::Art::Plant,
213
+ 'wasteland' => Bukkit::Art::Wasteland,
214
+ 'pool' => Bukkit::Art::Pool,
215
+ 'courbet' => Bukkit::Art::Courbet,
216
+ 'sea' => Bukkit::Art::Sea,
217
+ 'sunset' => Bukkit::Art::Sunset,
218
+ 'creebet' => Bukkit::Art::Creebet,
219
+ 'wanderer' => Bukkit::Art::Wanderer,
220
+ 'graham' => Bukkit::Art::Graham,
221
+ 'match' => Bukkit::Art::Match,
222
+ 'bust' => Bukkit::Art::Bust,
223
+ 'stage' => Bukkit::Art::Stage,
224
+ 'void' => Bukkit::Art::Void,
225
+ 'skullandroses' => Bukkit::Art::SkullAndRoses,
226
+ 'wither' => Bukkit::Art::Wither,
227
+ 'fighters' => Bukkit::Art::Fighters,
228
+ 'pointer' => Bukkit::Art::Pointer,
229
+ 'pigscene' => Bukkit::Art::Pigscene,
230
+ 'burningskull' => Bukkit::Art::Burningskull,
231
+ 'skeleton' => Bukkit::Art::Skeleton,
232
+ 'donkeykong' => Bukkit::Art::Donkeykong
233
+ }
234
+
235
+ art.each do |title, piece|
236
+ context "#by_name(#{title}) ## A String" do
237
+ before :each do
238
+ @found_art = @art.by_name(title)
239
+ end
240
+
241
+ it do
242
+ expect(@found_art).to be
243
+ end
244
+
245
+ it do
246
+ expect(@found_art).to be_truthy
247
+ end
248
+
249
+ it do
250
+ expect(@found_art).to_not be_falsey
251
+ end
252
+
253
+ it do
254
+ expect(@found_art).to_not be_nil
255
+ end
256
+
257
+ it do
258
+ expect(@found_art).to be piece
259
+ end
260
+ end
261
+
262
+ context "#by_name(#{title.to_sym}) ## A Non-String" do
263
+ before :each do
264
+ @found_art = @art.by_name(title.to_sym)
265
+ end
266
+
267
+ it do
268
+ expect(@found_art).to be
269
+ end
270
+
271
+ it do
272
+ expect(@found_art).to be_truthy
273
+ end
274
+
275
+ it do
276
+ expect(@found_art).to_not be_falsey
277
+ end
278
+
279
+ it do
280
+ expect(@found_art).to_not be_nil
281
+ end
282
+
283
+ it do
284
+ expect(@found_art).to be piece
285
+ end
286
+ end
287
+
288
+ context "#getByName(#{title}) ## A String" do
289
+ before :each do
290
+ @found_art = @art.getByName(title)
291
+ end
292
+
293
+ it do
294
+ expect(@found_art).to be
295
+ end
296
+
297
+ it do
298
+ expect(@found_art).to be_truthy
299
+ end
300
+
301
+ it do
302
+ expect(@found_art).to_not be_falsey
303
+ end
304
+
305
+ it do
306
+ expect(@found_art).to_not be_nil
307
+ end
308
+
309
+ it do
310
+ expect(@found_art).to be piece
311
+ end
312
+ end
313
+
314
+ context "#getByName(#{title.to_sym}) ## A Non-String" do
315
+ before :each do
316
+ @found_art = @art.getByName(title.to_sym)
317
+ end
318
+
319
+ it do
320
+ expect(@found_art).to be
321
+ end
322
+
323
+ it do
324
+ expect(@found_art).to be_truthy
325
+ end
326
+
327
+ it do
328
+ expect(@found_art).to_not be_falsey
329
+ end
330
+
331
+ it do
332
+ expect(@found_art).to_not be_nil
333
+ end
334
+
335
+ it do
336
+ expect(@found_art).to be piece
337
+ end
338
+ end
339
+ end
340
+ end
341
+
342
+ art = {
343
+ Bukkit::Art::Kebab => [0, 1, 1],
344
+ Bukkit::Art::Aztec => [1, 1, 1],
345
+ Bukkit::Art::Alban => [2, 1, 1],
346
+ Bukkit::Art::Aztec2 => [3, 1, 1],
347
+ Bukkit::Art::Bomb => [4, 1, 1],
348
+ Bukkit::Art::Plant => [5, 1, 1],
349
+ Bukkit::Art::Wasteland => [6, 1, 1],
350
+ Bukkit::Art::Pool => [7, 2, 1],
351
+ Bukkit::Art::Courbet => [8, 2, 1],
352
+ Bukkit::Art::Sea => [9, 2, 1],
353
+ Bukkit::Art::Sunset => [10, 2, 1],
354
+ Bukkit::Art::Creebet => [11, 2, 1],
355
+ Bukkit::Art::Wanderer => [12, 1, 2],
356
+ Bukkit::Art::Graham => [13, 1, 2],
357
+ Bukkit::Art::Match => [14, 2, 2],
358
+ Bukkit::Art::Bust => [15, 2, 2],
359
+ Bukkit::Art::Stage => [16, 2, 2],
360
+ Bukkit::Art::Void => [17, 2, 2],
361
+ Bukkit::Art::SkullAndRoses => [18, 2, 2],
362
+ Bukkit::Art::Wither => [19, 2, 2],
363
+ Bukkit::Art::Fighters => [20, 4, 2],
364
+ Bukkit::Art::Pointer => [21, 4, 4],
365
+ Bukkit::Art::Pigscene => [22, 4, 4],
366
+ Bukkit::Art::Burningskull => [23, 4, 4],
367
+ Bukkit::Art::Skeleton => [24, 4, 3],
368
+ Bukkit::Art::Donkeykong => [25, 4, 3]
369
+ }
370
+
371
+ art.each do |piece, params|
372
+ describe piece do
373
+ before :each do
374
+ @piece = piece
375
+ @initialized = @piece.new
376
+ end
377
+
378
+ it do
379
+ expect(@piece).to be
380
+ end
381
+
382
+ it do
383
+ expect(@piece).to be_truthy
384
+ end
385
+
386
+ it do
387
+ expect(@piece).to_not be_falsey
388
+ end
389
+
390
+ it do
391
+ expect(@piece).to_not be_nil
392
+ end
393
+
394
+ context '#new' do
395
+ it do
396
+ expect(@initialized).to be
397
+ end
398
+
399
+ it do
400
+ expect(@initialized).to be_truthy
401
+ end
402
+
403
+ it do
404
+ expect(@initialized).to_not be_falsey
405
+ end
406
+
407
+ it do
408
+ expect(@initialized).to_not be_nil
409
+ end
410
+
411
+ it do
412
+ expect(@initialized).to be_a Bukkit::Art
413
+ end
414
+ end
415
+
416
+ context '#id' do
417
+ before :each do
418
+ @id = @initialized.id
419
+ end
420
+
421
+ it do
422
+ expect(@id).to be
423
+ end
424
+
425
+ it do
426
+ expect(@id).to be_truthy
427
+ end
428
+
429
+ it do
430
+ expect(@id).to_not be_falsey
431
+ end
432
+
433
+ it do
434
+ expect(@id).to_not be_nil
435
+ end
436
+
437
+ it do
438
+ expect(@id).to be_an Integer
439
+ end
440
+
441
+ it do
442
+ expect(@id).to be params[0]
443
+ end
444
+ end
445
+
446
+ context '#width' do
447
+ before :each do
448
+ @width = @initialized.width
449
+ end
450
+
451
+ it do
452
+ expect(@width).to be
453
+ end
454
+
455
+ it do
456
+ expect(@width).to be_truthy
457
+ end
458
+
459
+ it do
460
+ expect(@width).to_not be_falsey
461
+ end
462
+
463
+ it do
464
+ expect(@width).to_not be_nil
465
+ end
466
+
467
+ it do
468
+ expect(@width).to be_an Integer
469
+ end
470
+
471
+ it do
472
+ expect(@width).to be params[1]
473
+ end
474
+ end
475
+
476
+ context '#getBlockWidth' do
477
+ before :each do
478
+ @width = @initialized.getBlockWidth
479
+ end
480
+
481
+ it do
482
+ expect(@width).to be
483
+ end
484
+
485
+ it do
486
+ expect(@width).to be_truthy
487
+ end
488
+
489
+ it do
490
+ expect(@width).to_not be_falsey
491
+ end
492
+
493
+ it do
494
+ expect(@width).to_not be_nil
495
+ end
496
+
497
+ it do
498
+ expect(@width).to be_an Integer
499
+ end
500
+
501
+ it do
502
+ expect(@width).to be params[1]
503
+ end
504
+ end
505
+
506
+ context '#height' do
507
+ before :each do
508
+ @height = @initialized.height
509
+ end
510
+
511
+ it do
512
+ expect(@height).to be
513
+ end
514
+
515
+ it do
516
+ expect(@height).to be_truthy
517
+ end
518
+
519
+ it do
520
+ expect(@height).to_not be_falsey
521
+ end
522
+
523
+ it do
524
+ expect(@height).to_not be_nil
525
+ end
526
+
527
+ it do
528
+ expect(@height).to be_an Integer
529
+ end
530
+
531
+ it do
532
+ expect(@height).to be params[2]
533
+ end
534
+ end
535
+
536
+ context '#getBlockHeight' do
537
+ before :each do
538
+ @height = @initialized.getBlockHeight
539
+ end
540
+
541
+ it do
542
+ expect(@height).to be
543
+ end
544
+
545
+ it do
546
+ expect(@height).to be_truthy
547
+ end
548
+
549
+ it do
550
+ expect(@height).to_not be_falsey
551
+ end
552
+
553
+ it do
554
+ expect(@height).to_not be_nil
555
+ end
556
+
557
+ it do
558
+ expect(@height).to be_an Integer
559
+ end
560
+
561
+ it do
562
+ expect(@height).to be params[2]
563
+ end
564
+ end
565
+ end
566
+ end