Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Synchronize `rspec spec` and `rake spec` output #838

Merged
merged 1 commit into from

2 participants

@sorentwo

By removing the rake spec short circuiting the output between
invocation methods matches more closely.

Fixes rspec/rspec-core#812

@sorentwo sorentwo Synchronize `rspec spec` and `rake spec` output
By removing the `rake spec` short circuiting the output between
invocation methods matches more closely.

Fixes rspec/rspec-core#812
6a0191d
@JonRowe
Owner

This seems a reasonable approach to synchronising the two outputs; we should let the main RSpec runner handle the scenario of no files, and let it notify users about any supplied pattern. I ran this myself from master on 1.9.2 and it passes so I'm assuming the failure is a Travis heisenbug.

@JonRowe JonRowe merged commit ab1fd53 into from
@JonRowe
Owner

Thanks @sorentwo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 20, 2013
  1. @sorentwo

    Synchronize `rspec spec` and `rake spec` output

    sorentwo authored
    By removing the `rake spec` short circuiting the output between
    invocation methods matches more closely.
    
    Fixes rspec/rspec-core#812
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 16 deletions.
  1. +8 −16 lib/rspec/core/rake_task.rb
View
24 lib/rspec/core/rake_task.rb
@@ -137,24 +137,16 @@ def setup_ivars(args)
@pattern = './spec{,/*/**}/*_spec.rb'
end
- def has_files?
- empty = files_to_run.empty?
- puts "No examples matching #{pattern} could be found" if empty
- not empty
- end
-
def run_task(verbose)
- files = has_files?
- if files
- command = spec_command
- begin
- puts command if verbose
- success = system(command)
- rescue
- puts failure_message if failure_message
- end
- raise("#{command} failed") if fail_on_error unless success
+ command = spec_command
+
+ begin
+ puts command if verbose
+ success = system(command)
+ rescue
+ puts failure_message if failure_message
end
+ raise("#{command} failed") if fail_on_error unless success
end
private
Something went wrong with that request. Please try again.