Displaying 1 result from an estimated 1 matches for "testablethread".
2007 Jan 21
1
A Thread / Mock question
...def execute(task)
@is_running = true
Thread.new(task) do |task_to_execute|
task_to_execute.run
@is_running = false
end
end
How can RSpec mock Thread.new in this case?
Maybe I should introduce some kind of ThreadFactory that creates
instances of TestableThread for the specifications.
bye,
Tobias