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!!
--
You received this message because you are subscribed to the Google Groups
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rspec/bdc5fc9f-0707-408a-9810-e553353aafc3n%40googlegroups.com.