Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7377

Show
Ignore:
Timestamp:
08/30/07 14:43:12 (10 months ago)
Author:
minam
Message:

fix tests broken by [7376]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tools/capistrano/test/deploy/strategy/copy_test.rb

    r7131 r7377  
    2727    mock_file.expects(:puts).with("154") 
    2828    File.expects(:open).with("/temp/dir/1234567890/REVISION", "w").yields(mock_file) 
    29     File.expects(:read).with("/temp/dir/1234567890.tar.gz").returns(:mock_file_contents) 
     29    File.expects(:open).with("/temp/dir/1234567890.tar.gz", "rb").yields(StringIO.new).returns(:mock_file_contents) 
    3030 
    3131    FileUtils.expects(:rm).with("/temp/dir/1234567890.tar.gz") 
     
    4949    mock_file.expects(:puts).with("154") 
    5050    File.expects(:open).with("/temp/dir/1234567890/REVISION", "w").yields(mock_file) 
    51     File.expects(:read).with("/temp/dir/1234567890.tar.gz").returns(:mock_file_contents) 
     51    File.expects(:open).with("/temp/dir/1234567890.tar.gz", "rb").yields(StringIO.new).returns(:mock_file_contents) 
    5252 
    5353    FileUtils.expects(:rm).with("/temp/dir/1234567890.tar.gz") 
     
    7171    mock_file.expects(:puts).with("154") 
    7272    File.expects(:open).with("/temp/dir/1234567890/REVISION", "w").yields(mock_file) 
    73     File.expects(:read).with("/temp/dir/1234567890.zip").returns(:mock_file_contents) 
     73    File.expects(:open).with("/temp/dir/1234567890.zip", "rb").yields(StringIO.new).returns(:mock_file_contents) 
    7474 
    7575    FileUtils.expects(:rm).with("/temp/dir/1234567890.zip") 
     
    9393    mock_file.expects(:puts).with("154") 
    9494    File.expects(:open).with("/temp/dir/1234567890/REVISION", "w").yields(mock_file) 
    95     File.expects(:read).with("/temp/dir/1234567890.tar.bz2").returns(:mock_file_contents) 
     95    File.expects(:open).with("/temp/dir/1234567890.tar.bz2", "rb").yields(StringIO.new).returns(:mock_file_contents) 
    9696 
    9797    FileUtils.expects(:rm).with("/temp/dir/1234567890.tar.bz2") 
     
    115115    mock_file.expects(:puts).with("154") 
    116116    File.expects(:open).with("/other/path/1234567890/REVISION", "w").yields(mock_file) 
    117     File.expects(:read).with("/other/path/1234567890.tar.gz").returns(:mock_file_contents) 
     117    File.expects(:open).with("/other/path/1234567890.tar.gz", "rb").yields(StringIO.new).returns(:mock_file_contents) 
    118118 
    119119    FileUtils.expects(:rm).with("/other/path/1234567890.tar.gz") 
     
    137137    mock_file.expects(:puts).with("154") 
    138138    File.expects(:open).with("/temp/dir/1234567890/REVISION", "w").yields(mock_file) 
    139     File.expects(:read).with("/temp/dir/1234567890.tar.gz").returns(:mock_file_contents) 
     139    File.expects(:open).with("/temp/dir/1234567890.tar.gz", "rb").yields(StringIO.new).returns(:mock_file_contents) 
    140140 
    141141    FileUtils.expects(:rm).with("/temp/dir/1234567890.tar.gz")