Sha256: 0508fe4e005235c33693c5e68a454bbb9dde4010e163f88551b1a36685e2029b
Contents?: true
Size: 588 Bytes
Versions: 1
Compression:
Stored size: 588 Bytes
Contents
require 'json' require 'spec_helper' describe "Cmds::call" do it "is reusable" do args_cmd = Cmds.new "./test/echo_cmd.rb <%= arg %>" kwds_cmd = Cmds.new "./test/echo_cmd.rb <%= s %>" ["arg one", "arg two", "arg three"].each do |arg| [args_cmd.call([arg]), kwds_cmd.call(s: arg)].each do |result| expect_argv( result ).to eq [arg] end end end # is reusable it "accepts input" do input = <<-BLOCK one two three four! BLOCK expect( Cmds.new("wc -l", input: input).call.out ).to match /^\s+4$/ end end # Cmds::call
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cmds-0.0.3 | spec/cmds/call_spec.rb |