Skip to content

Instantly share code, notes, and snippets.

@udzura
Created February 22, 2012 03:40
Show Gist options
  • Save udzura/1881139 to your computer and use it in GitHub Desktop.
Save udzura/1881139 to your computer and use it in GitHub Desktop.
parameterized rspec (just a mock)
# 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