Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

a little cleaner

  • Loading branch information...
commit d3907289a1d324f2e57fa192f20f5138b85bde0b 1 parent 500ec9a
@dchelimsky dchelimsky authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/rspec/core/configuration.rb
View
7 lib/rspec/core/configuration.rb
@@ -137,16 +137,15 @@ def files_to_run
end
def files_or_directories_to_run=(*files)
- p files
options[:files_to_run] = files.flatten.inject([]) do |result, file|
if File.directory?(file)
filename_pattern.split(",").each do |pattern|
result += Dir[File.expand_path("#{file}/#{pattern.strip}")]
end
else
- file =~ /([^:]*):?(\d+)?/
- self.line_number = $2 if $2
- result << $1
+ path, line_number = file.split(':')
+ self.line_number = line_number if line_number
+ result << path
end
result
end
Please sign in to comment.
Something went wrong with that request. Please try again.