Hi,
I have an unusual case where I need to do something like this:
def helper
context 'another context' do
let(:node_params) do
# I would like to merge with the
# the other node_params hash here
# but this doesn't work because
# there's no super() yet.
super().merge(
{
:y => 1,
}
)
end
it 'some test' do
end
end
end
describe 'something' do
# define node params
let(:node_params) do
{
:x => 1,
}
end
# call helper
helper
end
The helper function needs to get access to the node_params from the calling context (:x => 1), but i can't seem to be to do it. If I surround the call to helper with another context, then it will work.
Curious if there are elegant solutions to this. Thanks!!