-
Notifications
You must be signed in to change notification settings - Fork 553
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
Simplecov doesn't mark controller methods I know are being called #286
Comments
Check when you are loading Recommend close - debugging advice provided, stale, need a repro. |
Unfortunately, I have nothing loaded before simplecov in the spec_helper.rb
Can you please be more specific, as in, is there a way to log what controllers have been loaded so that I can add this just before the SimpleCov call? |
Look at your Rakefile. I bet you're requiring app code there before simplecov. |
Unfortunately not. It is the default Rails implementation
|
Hm, just had a quick glance over the current rake tasks file in rspec-rails master, nothing suspicious there. I know as a matter of fact that rails at least up to version 3 used to run the builtin unit tests, functional tests and integration tests tasks in separate processes, and hence SimpleCov's resultset merger had to fix things by providing explicit test suite names for these, see here. I think this got obsolete at some point on the road to Rails 4 and the tasks are currently all run as one, but I'm actually not sure about that. Anyway, could you please try to configure SimpleCov to use a randomized command_name and see if this fixes your results? This way we'd know if this is a multi-process test suite problem (just put Another possibility would be a |
Everything looks as suspected, but I played around a bit with the |
@coneybeare I see in my comment above you're still loading Rails before requiring simplecov. Take a look at #340 for more info |
Closing as stale. Please re-open if this is still an issue. |
I run a single controller test using
rspec
, the controller gets marked as 100%. I run the same tests as part ofrake spec
, and methods that I know are called are not being marked as covered. Where should I start debugging?The text was updated successfully, but these errors were encountered: