cmdtest/doc/CMDTEST_example.rb
2016-01-05 19:10:02 +01:00

21 lines
327 B
Ruby

class CMDTEST_example < Cmdtest::Testcase
def test_hello_world
cmd "echo hello" do
stdout_equal "hello\n"
end
cmd "echo WORLD" do
stdout_equal "world\n"
end
end
def test_touch_and_exit
cmd "touch bar.txt ; exit 8" do
created_files "foo.txt"
exit_status 7
end
end
end