Sha256: 631d38be58b4a6b8b8bb5aa4b603bf431022007b7fffbc98e49c9689da2eb7aa
Contents?: true
Size: 1.13 KB
Versions: 2
Compression:
Stored size: 1.13 KB
Contents
require 'spec_helper' module PrePush describe ArgsParser do describe 'execute' do describe "when no args provided" do it "should return default" do result = PrePush::ArgsParser.execute(nil) result[:runner].should == "nunit262" end end describe "when /r is specfied" do it "should parse value as a string" do result = PrePush::ArgsParser.execute(["/r=mspec,invalid,data"]) result[:runner].should == "mspec,invalid,data" end it "should return a result with a runner" do result = PrePush::ArgsParser.execute(["/r=mspec"]) result[:runner].should == "mspec" end end describe "when /td is specified" do it "should parse value as an array" do result = PrePush::ArgsParser.execute(["/td=./path/to/testable.dll"]) result[:test_dlls].should == ["./path/to/testable.dll"] end it "should return a result with multiple test dlls" do result = PrePush::ArgsParser.execute(["/td=./path/to/testable.dll,./path/to/another.dll"]) result[:test_dlls].should == ["./path/to/testable.dll","./path/to/another.dll"] end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pre_push-0.0.6 | spec/args_parser_spec.rb |
pre_push-0.0.5 | spec/args_parser_spec.rb |