Skip to content

Commit 93848bc

Browse files
alexchdshafik
authored andcommitted
use rspec double() instead of deprecated mock()
1 parent 88817f0 commit 93848bc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spec/markdown_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
)
2727

2828
# this is a hack to make the TOC work in the absence of a real site
29-
Site.should_receive(:named).and_return(mock(dir: "/tmp"))
29+
Site.should_receive(:named).and_return(double(dir: "/tmp"))
3030

3131
html_doc = Nokogiri.parse(page.to_html)
3232
main_html = html_doc.css("main").first.serialize(:save_with => 0).chomp

spec/step_page_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
)
1919

2020
# this is a hack to make the TOC work in the absence of a real site
21-
Site.should_receive(:named).and_return(mock(dir: "/tmp"))
21+
Site.should_receive(:named).and_return(double(dir: "/tmp"))
2222

2323
html_doc = Nokogiri.parse(page.to_html)
2424
main_html = html_doc.css("main").first.serialize(:save_with => 0).chomp

0 commit comments

Comments
 (0)