StackOverflow Questions for Tag: rspec-mocks

vetements
vetements

Reputation: 45

Expect method not to be called by default

Score: 0

Views: 56

Answers: 0

Read More
agbodike
agbodike

Reputation: 1866

RSpec: What are the alternatives to 'allow_any_instance_of'?

Score: 9

Views: 3385

Answers: 3

Read More
mr_muscle
mr_muscle

Reputation: 2910

How to test a private controller method without using allow_any_instance_of?

Score: 3

Views: 3315

Answers: 2

Read More
Paul Pettengill
Paul Pettengill

Reputation: 4855

Rspec stubbing a constant set to a Rails credential

Score: 0

Views: 230

Answers: 2

Read More
Malcolm O'Hare
Malcolm O'Hare

Reputation: 5009

RSpec any_args matcher failing with wrong number of arguments?

Score: 2

Views: 287

Answers: 0

Read More
daveharris
daveharris

Reputation: 395

rspec-mocks' doubles are designed to only last for one example

Score: 19

Views: 13450

Answers: 4

Read More
mdesantis
mdesantis

Reputation: 8517

RSpec: use `receive ... exactly ... with ... and_return ...` with different `with` arguments

Score: 2

Views: 1812

Answers: 2

Read More
Andrew
Andrew

Reputation: 2880

How to best use rspec mocks when using rails mailer parameterization

Score: 3

Views: 1082

Answers: 2

Read More
Code-Apprentice
Code-Apprentice

Reputation: 83577

Replace instance method with rspec-mock

Score: 0

Views: 770

Answers: 1

Read More
fp.monkey
fp.monkey

Reputation: 217

Stubbing a module, its methods, and inner classes with RSpec

Score: 0

Views: 1179

Answers: 1

Read More
ab217
ab217

Reputation: 17170

RSpec Mock Object Example

Score: 41

Views: 56128

Answers: 5

Read More
ddavison
ddavison

Reputation: 29062

How can I allow a superclass method to return something else?

Score: 1

Views: 159

Answers: 1

Read More
Jaffa
Jaffa

Reputation: 12719

Expect mock result to receive method

Score: 1

Views: 1785

Answers: 1

Read More
Rahil Shah
Rahil Shah

Reputation: 203

How to use sorbet type checking with RSpec mocks?

Score: 14

Views: 4193

Answers: 2

Read More
zhisme
zhisme

Reputation: 2800

Proper way to mock ruby-core classes

Score: 0

Views: 255

Answers: 1

Read More
Leticia Esperon
Leticia Esperon

Reputation: 2861

How can I supress warning "removing `initialize' may cause serious problems" in rspec?

Score: 4

Views: 935

Answers: 2

Read More
Erik Jacobs
Erik Jacobs

Reputation: 901

How do I test whether a Sidekiq worker is sending the right data to an external API?

Score: 0

Views: 1252

Answers: 1

Read More
user1022788
user1022788

Reputation: 457

How to check that a method has called another method with RSpec

Score: 2

Views: 2867

Answers: 1

Read More
Matt Flow
Matt Flow

Reputation: 11

Rspec : Declaring a variable that will be created into the method as record

Score: 1

Views: 198

Answers: 0

Read More
thebenman
thebenman

Reputation: 1621

How to unit test a method not invoking another object method in RSpec

Score: 0

Views: 683

Answers: 1

Read More
PreviousPage 1Next