Class: CemWinSpec::RspecTestCmds
- Inherits:
-
Object
- Object
- CemWinSpec::RspecTestCmds
- Defined in:
- lib/cem_win_spec/rspec_test_cmds.rb
Constant Summary collapse
- DEFAULT_PATTERN =
'spec/{classes,defines}/**/*_spec.rb'
Instance Method Summary collapse
- #cleanup_cmd ⇒ Object
- #cmd_chunked(*files) ⇒ Object
- #cmd_parallel(*args) ⇒ Object
- #cmd_standalone(*args) ⇒ Object
- #cmds(*args) ⇒ Object
-
#initialize(use_bundler: true, pattern: DEFAULT_PATTERN) ⇒ RspecTestCmds
constructor
A new instance of RspecTestCmds.
- #prep_cmd ⇒ Object
- #spec_files ⇒ Object
Constructor Details
#initialize(use_bundler: true, pattern: DEFAULT_PATTERN) ⇒ RspecTestCmds
Returns a new instance of RspecTestCmds.
9 10 11 12 |
# File 'lib/cem_win_spec/rspec_test_cmds.rb', line 9 def initialize(use_bundler: true, pattern: DEFAULT_PATTERN) @use_bundler = use_bundler @pattern = pattern end |
Instance Method Details
#cleanup_cmd ⇒ Object
34 35 36 |
# File 'lib/cem_win_spec/rspec_test_cmds.rb', line 34 def cleanup_cmd prefix 'rake cem:win_spec_clean' end |
#cmd_chunked(*files) ⇒ Object
22 23 24 |
# File 'lib/cem_win_spec/rspec_test_cmds.rb', line 22 def cmd_chunked(*files) prefix "rake 'cem:parallel_spec_files#{rake_args(files.join(' '))}'" end |
#cmd_parallel(*args) ⇒ Object
18 19 20 |
# File 'lib/cem_win_spec/rspec_test_cmds.rb', line 18 def cmd_parallel(*args) prefix "rake 'cem:parallel_spec_standalone#{rake_args(*args)}'" end |
#cmd_standalone(*args) ⇒ Object
14 15 16 |
# File 'lib/cem_win_spec/rspec_test_cmds.rb', line 14 def cmd_standalone(*args) prefix "rake 'cem:spec_standalone#{rake_args(nil, *args)}'" end |
#cmds(*args) ⇒ Object
30 31 32 |
# File 'lib/cem_win_spec/rspec_test_cmds.rb', line 30 def cmds(*args) spec_files.to_a.collect { |file| rspec_cmd(file, *args) } end |
#prep_cmd ⇒ Object
26 27 28 |
# File 'lib/cem_win_spec/rspec_test_cmds.rb', line 26 def prep_cmd prefix 'rake cem:win_spec_prep' end |
#spec_files ⇒ Object
38 39 40 |
# File 'lib/cem_win_spec/rspec_test_cmds.rb', line 38 def spec_files @spec_files ||= Rake::FileList[@pattern] end |