StackOverflow Questions for Tag: rspec-mocks

vetements
vetements

Reputation: 45

Expect method not to be called by default

Score: 0

Views: 52

Answers: 0

Read More
agbodike
agbodike

Reputation: 1846

RSpec: What are the alternatives to 'allow_any_instance_of'?

Score: 7

Views: 3307

Answers: 3

Read More
mr_muscle
mr_muscle

Reputation: 2900

How to test a private controller method without using allow_any_instance_of?

Score: 3

Views: 3308

Answers: 2

Read More
Paul Pettengill
Paul Pettengill

Reputation: 4855

Rspec stubbing a constant set to a Rails credential

Score: 0

Views: 223

Answers: 2

Read More
Malcolm O'Hare
Malcolm O'Hare

Reputation: 4999

RSpec any_args matcher failing with wrong number of arguments?

Score: 2

Views: 281

Answers: 0

Read More
daveharris
daveharris

Reputation: 395

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

Score: 19

Views: 13334

Answers: 4

Read More
mdesantis
mdesantis

Reputation: 8507

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

Score: 2

Views: 1801

Answers: 2

Read More
Andrew
Andrew

Reputation: 2870

How to best use rspec mocks when using rails mailer parameterization

Score: 3

Views: 1062

Answers: 2

Read More
Code-Apprentice
Code-Apprentice

Reputation: 83517

Replace instance method with rspec-mock

Score: 0

Views: 756

Answers: 1

Read More
fp.monkey
fp.monkey

Reputation: 217

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

Score: 0

Views: 1162

Answers: 1

Read More
ab217
ab217

Reputation: 17160

RSpec Mock Object Example

Score: 41

Views: 55950

Answers: 5

Read More
ddavison
ddavison

Reputation: 29032

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

Score: 1

Views: 157

Answers: 1

Read More
Jaffa
Jaffa

Reputation: 12700

Expect mock result to receive method

Score: 1

Views: 1762

Answers: 1

Read More
Rahil Shah
Rahil Shah

Reputation: 203

How to use sorbet type checking with RSpec mocks?

Score: 14

Views: 4139

Answers: 2

Read More
zhisme
zhisme

Reputation: 2800

Proper way to mock ruby-core classes

Score: 0

Views: 249

Answers: 1

Read More
Leticia Esperon
Leticia Esperon

Reputation: 2841

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

Score: 4

Views: 928

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: 1251

Answers: 1

Read More
user1022788
user1022788

Reputation: 447

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

Score: 1

Views: 2831

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: 674

Answers: 1

Read More
PreviousPage 1Next