-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a Rake task class that just adds the CI::Reporter formatter #14
Comments
I am unable to reproduce; you may need to provide a more comprehensive set of steps. Here's what I did: I set up a brand-new Ubuntu docker container:
I copied over your files:
I ran Rake:
I saw results:
|
Ugh. I just realized that the issue is that the HTML documentation isn't output, not the CI::Reporter output. I'm still looking. |
OK, so the problem is that we are using the As a workaround, you could use something like: ENV['SPEC_OPTS'] ||= ''
ENV['SPEC_OPTS'] += ' --format html --out spec/reports/results.html'
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = 'spec/heartbeat/heartbeat_spec.rb'
end You could also set those environment variables in another dependent task, in case you only want them set sometimes. |
As a longer term fix, it might be nice to create something like a I guess that also provides another alternative for you, instead of setting the environment variables. You could just add the appropriate arguments into your RakeTask. |
@shepmaster - this worked for me, thanks. I suppose I could provide an argument for rake, but since I'm already using CI, the solution you provided is an appropriate workaround. |
@abaird sounds good. I'm going to repurpose this ticket to maybe make a special Rake task that would make this less complicated. (In all my free time!) |
Suggestions for a future code writer: class CI::Reporter::RSpec::RakeTask < RSpec::Core::RakeTask Override the value of |
I have the following rake task (see gist w/ output) that incorporates ci-reporter-rspec. Whenever I run this with
bundle exec rake spec
I do not see my html documentation. Even if I change the t.rspec_opts line to just--format documentation
(which should print progress to STDOUT) I do not see that output. When I remove the ci-reporter require and rake task dependency, I see the formatted output just fine. Is there something else that I need to do to make ci-reporter-rpsec not clobber my rspec output?There is a similar issue reported here on SO. I am using Ruby 2.1.5, ci-reporter 2.0, ci-reporter-rspec 1.0, rspec 3.1.0 and rake 10.4.2.
The text was updated successfully, but these errors were encountered: