Sha256: 5cb11f615a3412288c92f136b36fbc7b40d9232b2782f80bc585361d5395a5c1
Contents?: true
Size: 1.06 KB
Versions: 63
Compression:
Stored size: 1.06 KB
Contents
require 'helper' # Make sure that exit codes of tests are propagated properly when using # simplecov. See github issue #5 class TestReturnCodes < Test::Unit::TestCase on_ruby '1.8', '1.9' do context "Inside fixtures/frameworks" do setup do @current_dir = Dir.getwd Dir.chdir(File.join(File.dirname(__FILE__), 'fixtures', 'frameworks')) FileUtils.rm_rf('./coverage') end should "have return code 0 when running testunit_good.rb" do `ruby testunit_good.rb` assert_equal 0, $?.exitstatus end should "have return code 0 when running rspec_good.rb" do `rspec rspec_good.rb` assert_equal 0, $?.exitstatus end should "have non-0 return code when running testunit_bad.rb" do `ruby testunit_bad.rb` assert_not_equal 0, $?.exitstatus end should "have return code 1 when running rspec_bad.rb" do `rspec rspec_bad.rb` assert_not_equal 0, $?.exitstatus end teardown do Dir.chdir(@current_dir) end end end end
Version data entries
63 entries across 48 versions & 6 rubygems