Sha256: 546233ce6826a353be5d544bb36e586ddd6424a20bb6581318e9e6ef4a2a39a0

Contents?: true

Size: 832 Bytes

Versions: 1

Compression:

Stored size: 832 Bytes

Contents

require 'helper'

class TestAlgorithm < Test::Unit::TestCase
  
  context "The example" do
    
    should "open the bubble sort algorithms" do
      algorithm = Jeka::Algorithm.new(File.join(File.dirname(__FILE__), "example", "01_bubble_sort"))
      assert_equal algorithm.name, "Bubble Sort"
      assert_equal algorithm.type, "Sorting"
      assert_equal algorithm.description, File.open(File.join(File.dirname(__FILE__), "example", "01_bubble_sort", "_description.textile")).readlines.join("")
      assert_equal algorithm.references, File.open(File.join(File.dirname(__FILE__), "example", "01_bubble_sort", "_references.textile")).readlines.join("")
      assert_equal algorithm.complexity, "O(n^2)"
      assert_equal algorithm.tests.length, 2
      assert_equal algorithm.implementations.length, 2
    end
    
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jeka-0.1.1 test/test_algorithm.rb