Skip to content

Instantly share code, notes, and snippets.

@mikelikesbikes
Created June 13, 2012 12:56
Show Gist options
  • Save mikelikesbikes/2923904 to your computer and use it in GitHub Desktop.
Save mikelikesbikes/2923904 to your computer and use it in GitHub Desktop.
Dynamic Rspec examples
describe "fibonacci" do
[
[0, 0],
[1, 1],
[2, 1],
[3, 2],
[4, 3],
[5, 5],
[6, 8]
].each do |index, value|
it "of #{index} should be #{value}" do
fib(index).should == value
end
end
def fib
# yay algorithm
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment