From e26c90f3793a0d8307f966e583d66a58f4630fbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhamatti=20Niemel=C3=A4?= Date: Tue, 29 Jan 2013 09:39:18 +0200 Subject: [PATCH] Spec for #55 --- spec/lib/backup_spec.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 spec/lib/backup_spec.rb diff --git a/spec/lib/backup_spec.rb b/spec/lib/backup_spec.rb new file mode 100644 index 00000000..54f05844 --- /dev/null +++ b/spec/lib/backup_spec.rb @@ -0,0 +1,20 @@ +require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') + +describe Backup do + describe ".process" do + + it "should include mysqldump into the zip file" do + backup = Backup.new + backup.process + + zip = Zip::ZipFile.open(Backup::BACKUP_ZIP) + zip.should_not be_nil + + entry = zip.find_entry("database_backup.sql") + entry.should_not be_nil + entry.get_input_stream do |f| + f.read(100).length.should > 0 + end + end + end +end