KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to share a memoized method between my specs. So I tried to use shared context like this RSpec.configure do |spec| spec.shared_context :specs do let(:response) { request.execute! } end end describe 'something' do include_context :specs end It works ok. But I have about 60 spec files, so I'm forced to explicitly include context in each of them. Is there an way to automatically include shared context (or at least let definition) for all example groups in spec_helper.rb ? Something like this RSpec.configure do |spec| spec.include_context :specs end
Tags (comma-separated)
Save Edits
Cancel