search for: threadfactory

Displaying 1 result from an estimated 1 matches for "threadfactory".

2007 Jan 21
1
A Thread / Mock question
...ecuted by the thread, like this?: 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