Which approach correctly stubs an instance method on a specific object in RSpec without affecting other instances?
-
A
allow(instance).to receive(:method_name).and_return(value)
-
B
stub_method(instance, :method_name, value)
-
C
instance.stub(:method_name) { value }
-
D
RSpec.stub_on(instance, :method_name, value)