require 'spec_helper'

describe Guard::Unity::Parser do

  let (:parser) { Guard::Unity::Parser.new( { results_path: Dir.pwd + '/spec/fixtures/UnitTestResults.xml' } ) }

  describe '#parse' do
    
    it "should bla" do
      results   = parser.parse
      expected  = { tests: 21, failures: 2, errors: 1, not_run: 2, inconclusive: 4, ignored: 1, skipped: 1, invalid: 0, test_cases: [{:name=>"test 1", :failed=>false, :message=>"", stack: ""}, {name: "test 2", failed: true, message: "Message", stack: 'foo'}, {name: "test 3", failed: true, message: "Message", stack: 'foo'}] } 
      results.should eq( expected )
    end

  end

end