public function testMessageSubject()
{
// This test is pretty much a "it compiles" test
$this->gitRoot = $this->shmock('\\Bart\\Git\\GitRoot', function ($root) {
$output = 'TOP-338 run unit tests when Nate or Zack commit code';
$resultStub = new StubbedCommandResult([$output], 0);
$root->getCommandResult("show -s --no-color --format='%%s' HEAD")->once()->return_value($resultStub);
});
$commit = new Commit($this->gitRoot, 'HEAD');
// Assert all lines of log message are included
$message = $commit->messageSubject();
$this->assertStringStartsWith('TOP-338', $message, 'No escape args silliness with quotes');
$this->assertEquals('TOP-338 run unit tests when Nate or Zack commit code', $message, 'line one and only line one');
}