Skip to content

Commit

Permalink
Fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
reagent committed Mar 30, 2010
1 parent 4064d8f commit f6766bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
10 changes: 6 additions & 4 deletions test/capistrano_rsync_with_remote_cache_test.rb
@@ -1,8 +1,9 @@
# This test suite was written way after the code, back when the author didn't do TDD consistently.
# Also, the code does a lot of things with external servers and services, so there's a lot of mocking.
# Therefore, this suite is nearly impossible to follow in places. Sorry.
require 'rubygems'
require 'test/unit'
require 'shoulda'
require 'mocha'

require 'test_helper'
require 'capistrano/recipes/deploy/strategy/rsync_with_remote_cache'

class CapistranoRsyncWithRemoteCacheTest < Test::Unit::TestCase
def stub_configuration(hash)
Expand Down Expand Up @@ -129,6 +130,7 @@ def stub_ssh_options(hash)
should "purge local cache if it detects #{scm} info has changed" do
stub_configuration(:scm => scm, :repository => 'repository')
info_command = Capistrano::Deploy::Strategy::RsyncWithRemoteCache::INFO_COMMANDS[scm]
File.stubs(:expand_path).with('.rsync_cache').returns('.rsync_cache')
File.expects(:directory?).with('.rsync_cache').returns(true)
IO.expects(:popen).with("cd .rsync_cache && #{info_command}").returns('abc')
FileUtils.expects(:rm_rf).with('.rsync_cache')
Expand Down
11 changes: 0 additions & 11 deletions test/test_helper.rb

This file was deleted.

0 comments on commit f6766bc

Please sign in to comment.