Created
October 26, 2010 01:26
-
-
Save nrocy/646146 to your computer and use it in GitHub Desktop.
ExtractConstant Bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Save this all as a file somewhere, open in Vim | |
# 2. Move the cursor to inside the string below, and cast this spell (followed by <CR>): "ayiW@a | |
13jf3viw,recTHREE | |
class AboutArrays < EdgeCase::Koan | |
def test_creating_arrays | |
empty_array = Array.new | |
assert_equal Array, empty_array.class | |
assert_equal 0, empty_array.size | |
end | |
def test_slicing_arrays | |
array = [:peanut, :butter, :and, :jelly] | |
assert_equal [:peanut], array[0,1] | |
magic_number = 333 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment