Sha256: 3a1853c141e7065b74a79ebac03fc09e823680f119e21f67a371fbeae11fbde9
Contents?: true
Size: 1.11 KB
Versions: 2
Compression:
Stored size: 1.11 KB
Contents
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'test_helper.rb')) class TestRunnerTest < Test::Unit::TestCase def setup @spec_file = File.expand_path(File.join(File.dirname(__FILE__), '..', 'fixtures', 'example_test_specification.yml')) @spec = YAML::load_file(@spec_file) end test "should create new TestRunner instance" do test_runner = AnySpec::TestRunner.new("ruby", @spec_file) assert_equal 'ruby', test_runner.target_executable assert_equal @spec["specification_root"], test_runner.specification_root assert_equal @spec["specification_extension"], test_runner.specification_extension assert_equal 4, test_runner.test_case_paths.length assert_equal 4, test_runner.test_cases.length end test "should raise error when specification file does not exist" do assert_raises Exception do test_runner = AnySpec::TestRunner.new("ruby", "~/blah/foo/blag.bar") end end test "should run test cases" do test_runner = AnySpec::TestRunner.new("ruby", @spec_file) results = test_runner.run_tests(true) assert_equal 4, results.length end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
any-spec-0.1.0 | test/unit/test_runner_test.rb |
any-spec-0.0.1 | test/unit/test_runner_test.rb |