Skip to content

Commit 07afbbc

Browse files
committed
fixup!
Stub a method that exists. Stubbing a non-existent method was silently failing.
1 parent 47893b8 commit 07afbbc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

spec/rspec/rails/example/view_example_group_spec.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,16 +235,15 @@ def _view; end # Stub method
235235

236236
it 'is accessible to hooks' do
237237
with_isolated_config do
238-
view = double("view")
239238
run_count = 0
240239
RSpec.configuration.before(:each, :type => :view) do
241-
allow(view).to receive(:a_stubbed_helper) { :value }
240+
allow(view).to receive(:render) { :value }
242241
run_count += 1
243242
end
244243
group = RSpec::Core::ExampleGroup.describe 'a view', :type => :view do
245244
specify { true }
246245
end
247-
group.run NullObject.new
246+
group.run
248247
expect(run_count).to eq 1
249248
end
250249
end

0 commit comments

Comments
 (0)