Skip to content

Commit 52bc397

Browse files
authored
rake generate_cops_documentation
1 parent c82391e commit 52bc397

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/modules/ROOT/pages/cops_rspec.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2678,8 +2678,11 @@ This cop can be configured in your configuration using the
26782678
----
26792679
# bad
26802680
expect(foo).to receive(:bar)
2681+
do_something
26812682
26822683
# good
2684+
allow(foo).to receive(:bar) # or use instance_spy
2685+
do_something
26832686
expect(foo).to have_received(:bar)
26842687
----
26852688

@@ -2688,10 +2691,13 @@ expect(foo).to have_received(:bar)
26882691
[source,ruby]
26892692
----
26902693
# bad
2694+
allow(foo).to receive(:bar)
2695+
do_something
26912696
expect(foo).to have_received(:bar)
26922697
26932698
# good
26942699
expect(foo).to receive(:bar)
2700+
do_something
26952701
----
26962702

26972703
=== Configurable attributes

0 commit comments

Comments
 (0)