Sha256: 3e3bb7900d888d1cf9cec7e52f18101baf166f607b5a1ea8a72a614ea8ca28cf
Contents?: true
Size: 1.14 KB
Versions: 1
Compression:
Stored size: 1.14 KB
Contents
require 'helper' class TestMake < Test::Unit::TestCase context "The example" do should "pass all the tests" do make = Jeka::Make.new(File.join(File.dirname(__FILE__), "example", "01_bubble_sort")) make.build make.test do |i, t, r| assert r end end should "generate the web pages" do falgorithm = File.new(File.join(File.dirname(__FILE__), "site", "algorithm.textile"), "r") falgorithm = falgorithm.readlines.join() falgorithm = falgorithm.gsub(/(\d)*\.(\d)*s/, "*") fcpp = File.new(File.join(File.dirname(__FILE__), "site", "cpp.textile"), "r") fcpp = fcpp.readlines.join() fruby = File.new(File.join(File.dirname(__FILE__), "site", "ruby.textile"), "r") fruby = fruby.readlines.join() make = Jeka::Make.new(File.join(File.dirname(__FILE__), "example", "01_bubble_sort")) make.build make.benchmark(1) algorithm, implementations = make.generate_site assert_equal falgorithm, algorithm[1].gsub(/(\d)*\.(\d)*s/, "*") assert_equal fruby, implementations[0][1] assert_equal fcpp, implementations[1][1] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jeka-0.1.1 | test/test_make.rb |