Created
February 22, 2012 03:40
-
-
Save udzura/1881139 to your computer and use it in GitHub Desktop.
parameterized rspec (just a mock)
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
# Parametarized test with RSpec DSL idea | |
# Just a mock... | |
describe "Sample" do | |
describe "plus" do | |
labels { a | b | answer } | |
it "should do additions", :with_sample => true do |a, b, answer| | |
(a + b).should == answer | |
end | |
where do | |
1 | 2 | 3 | |
5 | 8 | 13 | |
0 | 0 | 0 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment