Skip to content

Commit

Permalink
Prevent use of a failed driver
Browse files Browse the repository at this point in the history
Steve Kirkland committed Dec 13, 2024
1 parent 324e999 commit b808319
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/maze.rb
Original file line number Diff line number Diff line change
@@ -11,13 +11,22 @@ module Maze
VERSION = '9.21.0'

class << self
attr_accessor :check, :driver, :internal_hooks, :mode, :start_time, :dynamic_retry, :public_address,
attr_accessor :check, :internal_hooks, :mode, :start_time, :dynamic_retry, :public_address,
:public_document_server_address, :run_uuid, :scenario

def config
@config ||= Maze::Configuration.new
end

def driver
raise 'Cannot use a failed driver' if @driver&.failed?
@driver
end

def driver=(driver)
@driver = driver
end

def hooks
@hooks ||= Maze::Hooks::Hooks.new
end

0 comments on commit b808319

Please sign in to comment.