Skip to content

Commit 87b77ab

Browse files
committed
fixup! explicitly define method on self where we expect delegation to self for it
1 parent 87aee32 commit 87b77ab

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spec/rspec/rails/matchers/have_rendered_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,24 @@
33
include RSpec::Rails::Matchers::RenderTemplate
44
let(:response) { ActionDispatch::TestResponse.new }
55

6-
def assert_template(*); end # Stub method
7-
86
context "given a hash" do
7+
def assert_template(*); end
98
it "delegates to assert_template" do
109
expect(self).to receive(:assert_template).with({:this => "hash"}, "this message")
1110
expect("response").to send(template_expectation, {:this => "hash"}, "this message")
1211
end
1312
end
1413

1514
context "given a string" do
15+
def assert_template(*); end
1616
it "delegates to assert_template" do
1717
expect(self).to receive(:assert_template).with("this string", "this message")
1818
expect("response").to send(template_expectation, "this string", "this message")
1919
end
2020
end
2121

2222
context "given a symbol" do
23+
def assert_template(*); end
2324
it "converts to_s and delegates to assert_template" do
2425
expect(self).to receive(:assert_template).with("template_name", "this message")
2526
expect("response").to send(template_expectation, :template_name, "this message")
@@ -28,6 +29,7 @@ def assert_template(*); end # Stub method
2829

2930
context "with should" do
3031
context "when assert_template passes" do
32+
def assert_template(*); end
3133
it "passes" do
3234
expect do
3335
expect(response).to send(template_expectation, "template_name")

0 commit comments

Comments
 (0)