spec/install_spec.rb in lobot-0.9.4 vs spec/install_spec.rb in lobot-0.9.5
- old
+ new
@@ -12,26 +12,30 @@
it "creates ci.yml" do
assert_file "config/ci.yml", /app_name/
end
- it "creates ci.rake" do
- assert_file "lib/tasks/ci.rake", /namespace :ci do/
- end
-
it "create bootstrap_server.sh" do
assert_file "script/bootstrap_server.sh", /bin\/bash/
end
+ it "creates a ci_build.sh file" do
+ assert_file "script/ci_build.sh"
+ end
+
+ it "appends ci task to Rakefile" do
+ rakefile_contents = File.read("#{destination_root}/lib/tasks/ci.rake")
+ rakefile_contents.should include("task :build")
+ end
+
context "Capfile exists" do
it "appends a load path to the Capfile" do
prepare_destination
system("echo 'line 2' > #{destination_root}/Capfile")
run_generator
assert_file "Capfile", "load 'config/capistrano/ci'\nline 2\n"
end
-
end
context "Capfile doesn't exist" do
it "create a Capfile" do
assert_file "Capfile", /load 'config\/capistrano\/ci'/
@@ -62,7 +66,6 @@
directory "pivotal_server"
end
end
end
end
-
end