Sha256: d6cd5b7c6000518ac05e6b83f886def3bbe0d29f7bee39ab66a51566292ad240

Contents?: true

Size: 836 Bytes

Versions: 11

Compression:

Stored size: 836 Bytes

Contents

require 'helper'

module AjaxCat

	class TestPairs < Test::Unit::TestCase
	  context "run pairs from file" do

	  	setup do
	  		moses_ini_path = File.dirname(__FILE__) + "/../fixtures/moses.ini"
	  		@pair_name = 'de-en'
	  		@settings = {
	  			"pairs" => [
	  				{
	  					"name" => @pair_name,
	  					"moses_path" => 'moses',
	  					"moses_ini_path" => moses_ini_path
	  				},
	  				{
	  					"name" => @pair_name + "-2",
	  					"moses_path" => 'moses',
	  					"moses_ini_path" => moses_ini_path
	  				}
	  			]
	  		}
	  	end

	  	should "pairs should be started" do

	  		pairs = Pairs.new(@settings)

	  		result = pairs.process_request(Request::Raw.new("das ist"), @pair_name)
	  		assert_equal(724, result.size)
	  		assert_equal(['de-en','de-en-2'], pairs.list)
	  	end

	  	teardown do
	  		
	  	end

	  end
	end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ajax-cat-2.1.0 test/unit/test_pairs.rb
ajax-cat-2.0.5 test/unit/test_pairs.rb
ajax-cat-2.0.4 test/unit/test_pairs.rb
ajax-cat-2.0.3 test/unit/test_pairs.rb
ajax-cat-2.0.2 test/unit/test_pairs.rb
ajax-cat-2.0.1 test/unit/test_pairs.rb
ajax-cat-1.0.0 test/unit/test_pairs.rb
ajax-cat-0.5.0 test/unit/test_pairs.rb
ajax-cat-0.4.2 test/unit/test_pairs.rb
ajax-cat-0.4.1 test/unit/test_pairs.rb
ajax-cat-0.4.0 test/unit/test_pairs.rb