I find myself wanting to do something like this, and I'm curious to
hear what others think of this pattern.
describe "a hash with two values" do
let(:hsh) {{ xxx: 1, yyy: 2 }}
context "with a third value added" do
alias _hsh hsh
let(:hsh) { _hsh.merge(zzz: 3) }
it "should contain
If you declare :hsh in two peer context (neither inside the other), then
your shared group does the right thing: it demands the existence of :hsh
and blows up when it doesn't exist. Better design, no?
On Fri, Dec 21, 2012 at 9:24 AM, Arne Brasseur wrote:
> I find myself wanting to do something