Skip to content

Commit

Permalink
Actually shell out to test the installer
Browse files Browse the repository at this point in the history
Just to be sure a3d1f18
never happen again.
  • Loading branch information
sr committed Mar 16, 2009
1 parent 11d5329 commit fe0cd45
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions test/acceptance/installer_test.rb
Expand Up @@ -18,11 +18,9 @@ def root
Pathname("/tmp/i-haz-integrity")
end

def install(options={})
installer = Installer.new
installer.options = { :passenger => false, :thin => false }.merge!(options)
stdout, _ = util_capture { installer.install(root.to_s) }
stdout
def install(option="")
installer = File.dirname(__FILE__) + "/../../bin/integrity"
IO.popen("#{installer} install #{root} #{option}".strip).read
end

scenario "Installing integrity into a given directory" do
Expand All @@ -48,14 +46,14 @@ def install(options={})
end

scenario "Installing integrity for Passenger" do
install(:passenger => true)
install("--passenger")

assert root.join("public").directory?
assert root.join("tmp").directory?
end

scenario "Installing Integrity for Thin" do
install(:thin => true)
install("--thin")

config = YAML.load_file(root.join("thin.yml"))
config["chdir"].should == root.to_s
Expand All @@ -65,7 +63,7 @@ def install(options={})
end

scenario "Installing Integrity for Heroku" do
message = install(:heroku => true)
message = install("--heroku")

gemifest = root.join(".gems").read
assert gemifest.include?("mailfactory")
Expand Down

0 comments on commit fe0cd45

Please sign in to comment.