File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ def self.const_missing(name)
3030 require 'rubytest/recorder'
3131 require 'rubytest/advice'
3232 require 'rubytest/runner'
33- require 'rubytest/cli'
3433 require 'rubytest/reporters/abstract'
3534 require 'rubytest/reporters/abstract_hash'
3635else
@@ -40,7 +39,6 @@ def self.const_missing(name)
4039 require_relative 'rubytest/recorder'
4140 require_relative 'rubytest/advice'
4241 require_relative 'rubytest/runner'
43- require_relative 'rubytest/cli'
4442 require_relative 'rubytest/reporters/abstract'
4543 require_relative 'rubytest/reporters/abstract_hash'
4644end
Original file line number Diff line number Diff line change 11require 'rubytest'
22
33at_exit {
4- success = Test . run
4+ success = Test . run! ( ENV [ 'profile' ] || ENV [ 'p' ] )
55 exit -1 unless success
66}
77
Original file line number Diff line number Diff line change @@ -116,7 +116,15 @@ def initialize(settings={}, &block)
116116
117117 #apply_environment
118118
119- apply ( settings , &block )
119+ apply ( settings )
120+
121+ # save for lazy execution
122+ @block = block
123+ end
124+
125+ # Apply lazy block.
126+ def apply!
127+ @block . call ( self ) if @block
120128 end
121129
122130 # Evaluate configuration block.
@@ -129,6 +137,16 @@ def apply(hash={}, &block)
129137 block . call ( self ) if block
130138 end
131139
140+ #
141+ def name
142+ @name
143+ end
144+
145+ #
146+ def name = ( name )
147+ @name = name . to_s if name
148+ end
149+
132150 # Default test suite ($TEST_SUITE).
133151 #
134152 # @return [Array]
@@ -351,6 +369,8 @@ def mode=(type)
351369 # Convert configuration to shell options, compatible with the
352370 # rubytest command line.
353371 #
372+ # DEPRECATE: Shell command is considered bad approach.
373+ #
354374 # @return [Array<String>]
355375 def to_shellwords
356376 argv = [ ]
Original file line number Diff line number Diff line change @@ -55,7 +55,9 @@ def initialize(config) #:yield:
5555 else Test . configuration ( config )
5656 end
5757
58- yeild ( @config ) if block_given?
58+ @config . apply! # apply lazy config block
59+
60+ yield ( @config ) if block_given?
5961
6062 @advice = Advice . new
6163 end
You can’t perform that action at this time.
0 commit comments