Sha256: 06945cdaa53aed9fdb4d59e3a87c8a96127450cc2f7cf0d80ec77211961c2c50

Contents?: true

Size: 751 Bytes

Versions: 1

Compression:

Stored size: 751 Bytes

Contents

require File.dirname(__FILE__) + '/abstract_unit'

class TestSampleProjects < Test::Unit::TestCase
  SAMPLES_DIR = File.dirname(__FILE__) + '/sample_files'
  
  SAMPLE_LIBS = {
    :trivial => '/libtrivial/libtrivial.bundle',
    :syck => '/syck-0.55/ext/ruby/ext/syck/syck.bundle',
    :libxml => '/libxml-ruby-0.3.8/ext/xml/libxml_so.bundle'
  }
  
  # Set to true for full command line output
  @@debug = false
  
  SAMPLE_LIBS.each do |k,v|
    define_method("test_that_#{k}_compiles") do
      silence_command_line do
        system("rake test:samples:clobber PROJECT=#{k}")
      end
      assert_creates_file(SAMPLES_DIR + v) do
        silence_command_line do 
          system("rake test:samples:#{k}")
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mkrf-0.1.1 test/test_sample_projects.rb