Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P1163
RspecUnitTestEngine.php
Active
Public
Actions
Authored by
avivey
on May 23 2014, 8:55 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Flag For Later
Award Token
Tags
None
Referenced Files
F159450: RspecUnitTestEngine.php
May 23 2014, 8:55 PM
2014-05-23 20:55:44 (UTC+0)
Subscribers
None
<?php
/**
* Very basic 'rspec' unit test engine wrapper.
*
* @group unitrun
*/
final
class
RspecUnitTestEngine
extends
ArcanistBaseUnitTestEngine
{
public
function
run
()
{
$tmp_file
=
new
TempFile
();
$cmd_line
=
csprintf
(
"bundle exec rspec --failure-exit-code 0 -r yarjuf -f JUnit -o ${tmp_file}"
);
$future
=
new
ExecFuture
(
'%C'
,
$cmd_line
);
list
(
$stdout
,
$stderr
)
=
$future
->
resolvex
();
$parser
=
new
ArcanistXUnitTestResultParser
();
return
$parser
->
parseTestResults
(
Filesystem
::
readFile
(
$tmp_file
));
}
}
Event Timeline
avivey
edited the content of this paste.
(Show Details)
May 23 2014, 8:55 PM
2014-05-23 20:55:44 (UTC+0)
avivey
changed the title of this paste from untitled to
RspecUnitTestEngine.php
.
avivey
updated the paste's language from
autodetect
to
autodetect
.
Comment Actions
requires to install
https://github.com/natritmeyer/yarjuf
to create JUnit format.
Log In to Comment