Skip to content

Commit

Permalink
Remove unneeded require of rspec/core/project_initializer.
Browse files Browse the repository at this point in the history
Each require takes time and it is a waste to require a file like this
that is so rarely used up front. Things that are rarely used should
be required at the point they are used rather than upfront.
  • Loading branch information
myronmarston committed Jul 13, 2013
1 parent a0114a2 commit f67a72d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/rspec/core.rb
Expand Up @@ -28,7 +28,6 @@

require_rspec['core/world']
require_rspec['core/configuration']
require_rspec['core/project_initializer']
require_rspec['core/option_parser']
require_rspec['core/configuration_options']
require_rspec['core/command_line']
Expand Down
1 change: 1 addition & 0 deletions lib/rspec/core/option_parser.rb
Expand Up @@ -96,6 +96,7 @@ def parser(options)
end

parser.on('--init', 'Initialize your project with RSpec.') do |cmd|
require 'rspec/core/project_initializer'
ProjectInitializer.new(cmd).run
exit
end
Expand Down
1 change: 1 addition & 0 deletions spec/rspec/core/project_initializer_spec.rb
@@ -1,4 +1,5 @@
require "spec_helper"
require 'rspec/core/project_initializer'

module RSpec::Core
describe ProjectInitializer, :isolated_directory => true do
Expand Down

0 comments on commit f67a72d

Please sign in to comment.