mirror of
https://github.com/edgecase/ruby_koans.git
synced 2026-04-15 07:23:19 -04:00
@@ -126,7 +126,7 @@ class AboutClasses < EdgeCase::Koan
|
|||||||
# Why is this so?
|
# Why is this so?
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_different_objects_have_difference_instance_variables
|
def test_different_objects_have_different_instance_variables
|
||||||
fido = Dog6.new("Fido")
|
fido = Dog6.new("Fido")
|
||||||
rover = Dog6.new("Rover")
|
rover = Dog6.new("Rover")
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
require File.expand_path(File.dirname(__FILE__) + '/edgecase')
|
require File.expand_path(File.dirname(__FILE__) + '/edgecase')
|
||||||
|
|
||||||
class AboutIteration < EdgeCase::Koan
|
class AboutIteration < EdgeCase::Koan
|
||||||
|
in_ruby_version("1.8") do
|
||||||
|
def test_each_is_a_method_on_arrays
|
||||||
|
assert_equal __, [].methods.include?("each")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def test_each_is_a_method_on_arrays
|
in_ruby_version("1.9") do
|
||||||
assert_equal __, [].methods.include?(:each)
|
def test_each_is_a_method_on_arrays
|
||||||
|
assert_equal __, [].methods.include?(:each)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_iterating_with_each
|
def test_iterating_with_each
|
||||||
|
|||||||
Reference in New Issue
Block a user