Displaying 1 result from an estimated 1 matches for "customerwithdrawscashspec".
2006 Nov 21
5
Specification Reuse to avoid Combinatorial Explosions
..."should debit the account" do
end
specify "should dispense cash" do
end
specify "should return the card" do
end
end
That got me experimenting on reusing specifications by using a module to
create the specs. This is in customer_withdraws_cash_spec.rb:
module CustomerWithdrawsCashSpec
def should_debit_the_account
specify "should debit the account" do
end
end
...
end
...
context %{A Withdrawal where an Account is in credit
AND the card is valid
AND the dispenser contains cash
AND the customer requests cash} do
extend CustomerWith...