Rework builder interface to only use #run method - close #91
The builder's #run method will be called repeatedly until it returns true or false. The Builder#wait_for method can be used to cause a builder to wait for a Thread, Command, or another Builder.
This commit is contained in:
1 parent
8426a54a57
commit
b882f8de99
38 files changed
+580
-665
No files matched your search
@@ -1,12 +0,0 @@
|
||||
module Rscons
|
||||
module Builders
|
||||
describe SimpleBuilder do
|
||||
let(:env) {Environment.new}
|
||||
|
||||
it "should create a new builder with the given action" do
|
||||
builder = Rscons::Builders::SimpleBuilder.new({}) { 0x1234 }
|
||||
expect(builder.run(1,2,3,4,5)).to eq(0x1234)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -230,7 +230,7 @@ module Rscons
|
||||
describe "#find_finished_thread" do
|
||||
it "raises an error if called with nonblock=false and no threads to wait for" do
|
||||
env = Environment.new
|
||||
expect {env.__send__(:find_finished_thread, [], false)}.to raise_error /No threads to wait for/
|
||||
expect {env.__send__(:find_finished_thread, false)}.to raise_error /No threads to wait for/
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user