Return to Snippet

Revision: 14084
at May 19, 2009 02:14 by sou


Updated Code
#!/usr/bin/env ruby

$LOAD_PATH << "#{ENV["TM_SUPPORT_PATH"]}/lib"
require "web_preview"

class SymfonyDocTest
  
  attr_reader :root_dir, :test_file
  
  def initialize(args=ENV)
    @root_dir = ENV['TM_PROJECT_DIRECTORY']
    @test_file = ENV['TM_FILEPATH']
  end
  
  def appname
    'frontend'
  end
  
  def test_file
    @test_file.split(@root_dir +'/')
  end
  
  def run
    Dir.chdir @root_dir do
      system "symfony doctest #{appname} #{@test_file}"
    end
  end
end

dt = SymfonyDocTest.new

html_header "DocTest - #{dt.test_file}"
puts "<pre><code>"
dt.run
puts "</code></pre>"
html_footer

Revision: 14083
at May 19, 2009 02:11 by sou


Initial Code


Initial URL


Initial Description


Initial Title
TextMate command - run DocTest

Initial Tags
php, textmate

Initial Language
Other