stub
RSpec Stubbing: return in a sequence
I know the following things work: returning a parameter subject.should_receive(:get_user_choice){ |choices| choices.to_a[0] }[详细]
2023-04-12 23:23 分类:问答Stubbing out functions or classes
Can you explain the concept stubbing out functions or classes taken from this article? class Loaf: pass[详细]
2023-04-10 13:39 分类:问答Optional stubbing in Mockito
I want to create a method in superclass of test-class that stubs some commonly used methods in under-test-classes but some of those methods might not exist.[详细]
2023-04-07 05:15 分类:问答How to stub a static method?
I am working on a brownfield application and am currently refactoring part of it. I am trying to do this开发者_如何学运维 in a TDD fashion but am running into a problem. Part of the code I am testing[详细]
2023-04-05 16:38 分类:问答StructureMap stub injection
I\'m using StructureMap and trying to register a temporary implementation for an interface (a stub). After reading this article I came up with the following setup:[详细]
2023-04-05 00:20 分类:问答Rhino Mocks: Stub & Mocks. What is the difference
I\'m using Rhino Mocks in my unit test. I would like to know the difference between STUBS and MOCKS (mocks.Stub<T>() andmocks.StrictMock<T&g开发者_如何转开发t;()).I think it had been asked b[详细]
2023-04-01 18:22 分类:问答How to stub DataMapper association with RSpec2?
I\'m trying to write some specs and want to stub out the calls to the database so I don\'t rely on an开发者_StackOverflow actual filled database to get the tests running.[详细]
2023-03-29 04:23 分类:问答How to stub require() / expect calls to the "root" function of a module?
Consider the following jasmine spec: describe(\"something.act()\", function() { it(\"calls some function of my module\", function() {[详细]
2023-03-27 07:22 分类:问答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 stub. Can anyone put some light on 开发者_C百科it?I assume you are referring to the terminology[详细]
2023-03-22 18:54 分类:问答How to stub a socket in C?
I\'ve written client code that\'s supposed to send some data through a socket and read back an answer from the remote server.[详细]
2023-03-20 01:07 分类:问答