Sha256: 9f784dc34021fe7a8b44461f19c45e81f3a4e604b3e306b610d84aedb06ed7d7
Contents?: true
Size: 1.28 KB
Versions: 2
Compression:
Stored size: 1.28 KB
Contents
require 'spec_helper' describe Wukong::Local::LocalRunner do before { EM.stub!(:run) } describe "choosing a processor name" do it "raises an error without any arguments" do expect { local_runner() }.to raise_error(Wukong::Error, /must provide.*processor.*run.*argument/i) end it "raises an error when passed the name of a processor that isn't registered" do expect { local_runner('some_proc_that_dont_exit') }.to raise_error(Wukong::Error, /no such processor.*some_proc.*/i) end it "accepts an explicit --run argument" do local_runner('--run=identity').processor.should == 'identity' end it "accepts a registered processor name from the first argument" do local_runner('identity').processor.should == 'identity' end it "accepts a registerd processor name from the the basename of the first file argument" do local_runner(examples_dir('string_reverser.rb')).processor.should == 'string_reverser' end end describe "uses a" do it "StdioDriver by default" do local_runner('identity').driver.should == Wukong::Local::StdioDriver end it "TCPDriver when given a --port argument" do local_runner('identity','--tcp_port=6000').driver.should == Wukong::Local::TCPDriver end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wukong-3.0.1 | spec/wukong/local/runner_spec.rb |
wukong-3.0.0 | spec/wukong/local/runner_spec.rb |