Sha256: bb44602ca5f5b12e717da3b4852307f9b4540ffed4f081dd0d09cf5ce646384e
Contents?: true
Size: 1.17 KB
Versions: 1
Compression:
Stored size: 1.17 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 |implementation, input, output, result| assert result 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.generate_site(1) do |algorithm, implementations| assert_equal falgorithm, algorithm[0].gsub(/(\d)*\.(\d)*s/, "*") assert_equal fruby, implementations[0][0] assert_equal fcpp, implementations[1][0] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jeka-0.1.0 | test/test_make.rb |