3 class ArrayTest < EdgeCase::TestCase
6 food = [:peanut, :button, :and, :jelly]
7 assert_equal __, food[0]
8 assert_equal __, food.size
12 food = [:peanut, :button, :and, :jelly]
13 assert_equal __, food.first
14 assert_equal __, food.last
15 assert_equal __, food[0]
16 assert_equal __, food[2]
17 assert_equal __, food[(food.size() - 1)]
20 def test_arrays_with_other_objects
21 food = [:peanut, :button, :and, :jelly, 1, nil]
22 assert_equal __, food.size
23 assert_equal __, food.last
24 assert_equal __, food[5]
27 def test_adding_to_an_array_with_shovel_shovel
28 food = [:peanut, :button, :and, :jelly]
30 assert_equal __, food.size
31 assert_equal __, food.first
34 def test_adding_to_an_array_with_push
35 food = [:peanut, :button, :and, :jelly]
37 assert_equal __, food.last
40 def test_adding_to_an_array_with_unshift
41 food = [:peanut, :button, :and, :jelly]
43 assert_equal __, food.first