test/general.rb in runeblog-0.0.87 vs test/general.rb in runeblog-0.0.88
- old
+ new
@@ -188,10 +188,12 @@
after = out.split("\n").length
assert after == before - 3, "list_posts saw #{before} posts, now #{after} (not #{before-3})"
system("ruby test/make_blog.rb") # This is hellish, I admit
end
+if File.exist?("testing.deploy")
+
def test_016_can_deploy
x = OpenStruct.new
x.user, x.server, x.docroot, x.docroot, x.path, x.proto =
"root", "rubyhacker.com", "/var/www", "whatever", "http"
dep = RuneBlog::Deployment.new(x)
@@ -216,9 +218,11 @@
"root", "nonexistent123.com", "/var/www", "whatever", "http"
dep = RuneBlog::Deployment.new(x)
result = dep.remote_login?
assert result.nil?, "Expected to detect login error (bad server)"
end
+
+end
# later tests...
# new view asks for deployment info and writes it
# (how to mimic user input? test some other way?)