Skip to content

Commit 3f0dc52

Browse files
committed
update runnable context to support use when describing non-runnables
1 parent bf7a41e commit 3f0dc52

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spec/runnable_context.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
let(:test_session) { repo_create(:test_session, test_suite_id: suite_id) }
66

77
before do
8-
allow(described_class).to receive(:suite).and_return(suite) if described_class.parent.nil?
8+
if !(described_class.singleton_class < Inferno::DSL::Runnable) ||
9+
described_class.parent.nil?
10+
allow(described_class).to receive(:suite).and_return(suite)
11+
end
912
rescue NameError
1013
raise StandardError, "No suite id defined. Add `let(:suite_id) { 'your_suite_id' }` to the spec"
1114
end

0 commit comments

Comments
 (0)