Top "Stub" questions

A replacement implementation for objects, methods, or functions in order to remove external dependencies.

How to stub static methods with sinon in ES6?

var MyClassStub = sinon.createStubInstance(MyClass); MyClassStub doesn't contain static methods. How to fix that?

node.js sinon stub
sinon not stubbing property value

I am using sinon v4.1.2. According to the documentation (http://sinonjs.org/releases/v4.1.2/sandbox/), I should be able to …

sinon stub
Can't stub things with Rspec

I have a Rails 4 application, and here is my lib/foobar: jan@rmbp ~/D/r/v/l/foobar> tree . ├── …

ruby-on-rails rspec ruby-on-rails-4 stub
Mockito: Stub method with complex object as a parameter

Maybe this is a newbie question, but can't find the answer. I need to stub a method with Mockito. If …

java parameters mockito stub
Wiremock Stand alone - How to manipulate response with request data

I was trying to implement mocking of POST REST call using Wiremock Standalone server. I am faced with a challenge …

java mocking stub wiremock
Is there a way to undo Mocha stubbing of any_instance in Test::Unit

Much like this question, I too am using Ryan Bates's nifty_scaffold. It has the desirable aspect of using Mocha's …

ruby testing mocking stub ruby-mocha
Testing software: fake vs stub

There are quite a few written about stub vs mocks, but I can't see the real difference between fake and …

testing terminology stub
Stubbing Chained Queries in Rails 3 and Rspec

I'm trying to test a scope I have that is based upon a chain of other scopes. ("public_stream" below). …

activerecord ruby-on-rails-3 rspec stub
What is the difference between rhino-mocks stub and expect

What is the difference between rhino-mocks stub and expect here: Looks to me that they behave exact the same? mockContext.…

mocking rhino-mocks stub stubbing expectations
how to stub HttpControllerContext

I am trying to unit-test a piece of code that gets called from a WebAPI (OData) controller and takes in …

c# asp.net-web-api stub microsoft-fakes