Method: RSpec::Parameterized::ExampleGroupMethods#with_them
- Defined in:
- lib/rspec/parameterized.rb
#with_them(*args, &b) ⇒ Object
Use parameters to execute the block. The given block is converted into describes for each parameter set.
## Example
with_them do
it "should do additions" do
(a + b).should == answer
end
end
69 70 71 72 73 74 75 76 |
# File 'lib/rspec/parameterized.rb', line 69 def with_them(*args, &b) if @parameter.nil? @parameterized_pending_cases ||= [] @parameterized_pending_cases << [args, b] else define_cases(@parameter, *args, &b) end end |