Rspec: expect "super" to get called

Viewed 1026

I have a very short function to test:

def my_fn
  if some_condition
    super(@my_attr)
  end
end

And I want my spec to do verify that super gets called, but I can't do the following because :super appears not to be a message that ever gets sent:

    expect(subject).to receive(:super)
0 Answers
Related