spec/cmds_spec.rb in cmds-0.0.9 vs spec/cmds_spec.rb in cmds-0.1.0
- old
+ new
@@ -2,6 +2,17 @@
describe Cmds do
it 'has a version number' do
expect(Cmds::VERSION).not_to be nil
end
+
+ it "has dees syntax" do
+ expect(Cmds.chomp! "echo 'here'").to eq 'here'
+
+ expect(
+ Cmds::Cmd.new("head %{opts} %s").
+ prepare("/dev/random", opts: {c: 64})
+ ).to eq "head -c 64 /dev/random"
+
+ # expect(Cmds.chomp! "echo %s", 'here').to eq 'here'
+ end
end