From f56a27597d44d4b4d356de0a8b9d0703e6016fd8 Mon Sep 17 00:00:00 2001 From: flippingbits Date: Sat, 11 Dec 2010 10:37:18 +0100 Subject: [PATCH] Return a thread with a block --- spec/titan/cli_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/titan/cli_spec.rb b/spec/titan/cli_spec.rb index e9040e9..171b658 100644 --- a/spec/titan/cli_spec.rb +++ b/spec/titan/cli_spec.rb @@ -22,7 +22,10 @@ context "given there are threads available" do before(:each) do - Titan::Thread.stub!(:all).and_return({'test' => Titan::Thread.new(:id => 'test')}) + thread = Titan::Thread.new(:id => 'test') do + 1+1 + end + Titan::Thread.stub!(:all).and_return({'test' => thread}) end it "should print the threads as a table" do