spec/cmds/call_spec.rb in cmds-0.0.2 vs spec/cmds/call_spec.rb in cmds-0.0.3
- old
+ new
@@ -11,6 +11,17 @@
[args_cmd.call([arg]), kwds_cmd.call(s: arg)].each do |result|
expect_argv( result ).to eq [arg]
end
end
end # is reusable
-end # Cmds::run
+
+ 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
\ No newline at end of file