Created
November 19, 2013 13:46
-
-
Save blake41/7545587 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def first_even(items) | |
#code goes here | |
end |
This file contains hidden or 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
require_relative "even_solution" | |
describe "first even" do | |
it "should return the first even number in an array" do | |
first_even([30, 17, 77, 102]).should eq(30) | |
end | |
it "should return the first even number in an array" do | |
first_even([5, 11, 50]).should eq(50) | |
end | |
it "should return the first even number in an array" do | |
first_even([3, 5, 15, 16, 23, 42]).should eq(16) | |
end | |
it "should return the first even number in an array" do | |
first_even([300, 22, 1, 55, 42]).should eq(300) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment