Sha256: bc6e36b5c6f895edc931fd55b8cc76316370c4f475b0b24c56e04bf20758f21f

Contents?: true

Size: 685 Bytes

Versions: 6

Compression:

Stored size: 685 Bytes

Contents

$:.push File.expand_path('../../lib', __FILE__)

require 'rubygems'  if !Object.respond_to?(:gem)

gem "contest", "~> 0.1"

require 'proton'
require 'contest'

class TestCase < Test::Unit::TestCase
  # Shorthand
  Page    = Proton::Page
  Project = Proton::Project

  def fixture(*a)
    path = File.expand_path('../fixture', __FILE__)
    File.join path, *a
  end

  def build(path)
    @project = Proton::Project.new(path)
    @project.pages.each { |p| p.write }
    @project
  end

  def unbuild(project=@project)
    FileUtils.rm_rf project.path(:output)
  end
end

class Proton::Set
  # Because 1.8.6 doesn't support map(&:path)
  def paths
    map { |page| page.path }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
proton-0.3.6 test/helper.rb
proton-0.3.5 test/helper.rb
proton-0.3.4 test/helper.rb
proton-0.3.3 test/helper.rb
proton-0.3.2 test/helper.rb
proton-0.3.0.rc1 test/helper.rb