Top "Stub" questions

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

What is double method in rspec for?

It is stated in rspec doc that I should use double method in order to create test double. But I …

ruby rspec mocking stub
How do I stub new Date() using sinon?

I want to verify that various date fields were updated properly but I don't want to mess around with predicting …

javascript testing sinon stub
What is an easy way to stub / dummy a restful web service?

I want to create an android application, this application will make RESTful calls to a web service to obtain some …

android web-services rest stub dummy-data
Android Local Service Sample, bindservice(), and ServiceConnection()

I have a question which is related to this question that was asked by @mnish about a year ago. Please …

android android-service stub android-binder
What is " Stub " and "AIDL" for in java?

Question 1: I am studying Android service and often see code like this: private ISampleService.Stub sampleServiceIf = new ISampleService.Stub(){} What …

android service stub aidl
In RSpec, is there a method equivalent to "unstub" but for "should_receive"?

Is there any method to remove any stubbing and mocking while using RSpec? Example: RestClient.should_receive(:delete).with("http://…

rspec mocking stub
Rspec: Stub method that is in the controller

May I know how to stub method that is in the controller create method? I need to write the spec …

ruby-on-rails rspec ruby-on-rails-3.2 mocking stub
How to test background jobs (Sidekiq) with Rspec?

A large part of my application relies on background jobs to process user's websites, so I need to write some …

ruby-on-rails rspec background-process stub sidekiq
Stubbing a Property get using Rhino Mocks

Using RhinoMocks, I am trying to Stub the getter value of a property. The property is defined as part of …

c# properties rhino-mocks stub
Django unit testing with date/time-based objects

Suppose I have the following Event model: from django.db import models import datetime class Event(models.Model): date_start = …

python django unit-testing datetime stub