Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 32258ca

Browse files
committed
Moved ivar initialization back into #initialize.
1 parent 5b49880 commit 32258ca

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

lib/rspec/core/rake_task.rb

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,13 @@ class RakeTask < ::Rake::TaskLib
6060
attr_accessor :rspec_opts
6161

6262
def initialize(*args, &task_block)
63-
setup_ivars(args)
63+
@name = args.shift || :spec
64+
@ruby_opts = nil
65+
@rspec_opts = nil
66+
@verbose = true
67+
@fail_on_error = true
68+
@rspec_path = 'rspec'
69+
@pattern = './spec{,/*/**}/*_spec.rb'
6470

6571
define(args, &task_block)
6672
end
@@ -83,17 +89,6 @@ def run_task(verbose)
8389

8490
private
8591

86-
# @private
87-
def setup_ivars(args)
88-
@name = args.shift || :spec
89-
@ruby_opts = nil
90-
@rspec_opts = nil
91-
@verbose = true
92-
@fail_on_error = true
93-
@rspec_path = 'rspec'
94-
@pattern = './spec{,/*/**}/*_spec.rb'
95-
end
96-
9792
# @private
9893
def define(args, &task_block)
9994
desc "Run RSpec code examples" unless ::Rake.application.last_comment

0 commit comments

Comments
 (0)