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
calas-capitate-0.3.6 test/test_templates.rb
capitate-0.1.8 test/test_templates.rb
capitate-0.1.9 test/test_templates.rb
capitate-0.2.13 test/test_templates.rb
capitate-0.2.2 test/test_templates.rb
capitate-0.1.7 test/test_templates.rb
capitate-0.2.1 test/test_templates.rb
capitate-0.2.11 test/test_templates.rb
capitate-0.2.14 test/test_templates.rb
capitate-0.2.15 test/test_templates.rb
capitate-0.2.3 test/test_templates.rb
capitate-0.3.6 test/test_templates.rb
capitate-0.2.5 test/test_templates.rb
capitate-0.2.6 test/test_templates.rb
capitate-0.2.8 test/test_templates.rb
capitate-0.3.3 test/test_templates.rb
capitate-0.2.7 test/test_templates.rb
capitate-0.3.1 test/test_templates.rb
capitate-0.3.2 test/test_templates.rb
capitate-0.3.4 test/test_templates.rb