import java.io.*;
import org.codehaus.plexus.util.FileUtils;


String log = FileUtils.fileRead( new File( basedir, "build.log" ) );
String expected = "1 example, 0 failures";
if ( !log.contains( expected ) )
{
    throw new RuntimeException( "log file does not contain '" + expected + "'" );
}

File f = new File( new File( new File( basedir, "target" ), "surefire-reports" ), "TEST-rspec.xml" );
if ( !f.exists() )
{
    throw new RuntimeException( "file does not exists: " + f );
}
