Why is this failing so bad?

rspec

#1

The only change between this failing build:

https://circleci.com/gh/drazisil/discourse/6

And this passing one:

https://circleci.com/gh/drazisil/discourse/5

Is this small part of code.

https://github.com/drazisil/discourse/commit/97947dfa69415a058e75c616ad4454f8c781dc89

Could someone better then me at rspec possibly spot what is failing?


#2

I don’t know anything about rspec, but the way I got this figured out was by manually moving my xml files from the default output location into the $CIRCLE_TEST_REPORTS folder.
Maybe try put the output in it’s normal place, then use mv to get it into the $CIRCLE_TEST_REPORTS dir.
That way you wont have to try and figure our rspec.
Thats the best I got
:)grin:


#3

Thanks, I’ll try that. Where is the default rspec output? Do you have a section of circle.yml you could share?


#4

We use codeception, not rspec, so I am not sure.
It looks like you can define the output with format, but you are already using that.
https://relishapp.com/rspec/rspec-core/docs/command-line/format-option

I would maybe put that whole crazy command into a .sh file, then you won’t lose efficiency, but you can space it all out, and maybe that will help you get it working.

The way we are collecting out meta data is like so

cd _output
echo "add xml output to test reports folder"
find . -name '*.xml' -exec mv {} $CIRCLE_TEST_REPORTS/codeception/ \;
``

But you helped me write that code, so you know it already :smile:

I would try to get the output into xml using --format --out xml or something like that.

Or you could try this out, seems like just the thing you need
https://github.com/sj26/rspec_junit_formatter

Good luck drazisil

#5