cmdtest/t/00-file_not_equal.rb
Johan Holmberg 2c61efb00d add tests
2009-03-24 08:43:47 +00:00

33 lines
586 B
Ruby

#======================================================================
# test file_not_equal
#-----------------------------------
# file_not_equal -- correct ""
File.open("foo", "w") {|f| f.puts "hello" }
cmd "true.rb" do
file_not_equal "foo", ""
end
# stdout begin
# ### true.rb
# stdout end
#-----------------------------------
# file_not_equal -- incorrect ""
File.open("foo", "w") {}
cmd "true.rb" do
file_not_equal "foo", ""
end
# stdout begin
# ### true.rb
# --- ERROR: wrong file 'foo'
# --- actual: [[empty]]
# --- expect: [[empty]]
# stdout end