Sha256: 71ba5e930ea309472f4fc2e907fe484d42e4d0dbe8482605650911e655cb19fc

Contents?: true

Size: 547 Bytes

Versions: 21

Compression:

Stored size: 547 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper.rb'

class TestTemplates < Test::Unit::TestCase
  
  TmpDir = File.dirname(__FILE__) + "/tmp"

  def setup
    FileUtils.mkdir(TmpDir)
  end
  
  def teardown
    FileUtils.rm_rf(TmpDir)
  end

  def test_write    
    TemplatesPlugin.write("capistrano/Capfile", "#{TmpDir}/Capfile")
    
    lines = ""
    File.open("#{TmpDir}/Capfile") { |f| lines = f.readlines }
    assert lines.length > 0
  end
  
end

class TemplatesPlugin
  class << self
    include Capitate::Plugins::Templates  
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
capitate-0.3.5 test/test_templates.rb