1 $LOAD_PATH << File.dirname(__FILE__)
5 describe TestUnitBackend, " when augmenting test results" do
7 FileUtils.cd(PROJECT_ROOT)
8 FileUtils.rm_r('test/.augment') rescue nil
10 TestUnitBackend.run('test/test_drink.rb')
13 it "should color failing/erroring tests" do
14 File.should exist(Augment.augment_path('test/test_drink.rb'))
15 layers = Layer.read('test/test_drink.rb')
16 layers.first.color.should == 'red'
17 layers.last.color.should == 'yellow'
19 layers.first.range.should == (289 ... 332)
22 it "should include failure message" do
23 layers = Layer.read('test/test_drink.rb')
24 layers.first.message.should =~ /bad length/
25 layers.last.message.should =~ /undefined local variable or method/
26 layers.map{ |l| l.backend }.uniq.should == ['testunit']