Created
February 23, 2012 12:04
-
-
Save royosherove/1892558 to your computer and use it in GitHub Desktop.
There's has to be a cleaner way to do this with rspec and ruby
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,2",3], ["1,3",4] ].each do |arr| | |
it "'s add method should return the sum of multiple numbers" do | |
StringCalc.new.add(arr[0]).should == arr[1] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd do something similar, but use
example
in place ofit
.