infinity_test 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,7 @@
1
+ v1.0.1
2
+
3
+ - Fix a serious bug for Test::unit users (just run one test file instead of all tests)
4
+
1
5
  v1.0.0
2
6
  ==============
3
7
 
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 0
4
- :patch: 1
4
+ :patch: 2
5
5
  :build:
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{infinity_test}
8
- s.version = "1.0.1"
8
+ s.version = "1.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tomas D'Stefano"]
@@ -250,18 +250,23 @@ module InfinityTest
250
250
  # files_to_run!(match_data) # => return the test file
251
251
  #
252
252
  def files_to_run!(options)
253
- files = lambda do
254
- options.to_s if options.is_a?(MatchData)
253
+ files = search_files_to_run!(options)
254
+ # Fix fo Test::Unit - But this is not responsability of the Application instances - Refactoring this
255
+ files = "#{test_framework.test_loader} #{files}" if test_framework.respond_to?(:test_loader)
256
+ files
257
+ end
258
+
259
+ def search_files_to_run!(options)
260
+ case options
261
+ when MatchData
262
+ options.to_s
263
+ when Hash,Symbol
255
264
  if options.equal?(:all) or options.include?(:all)
256
265
  search_files_in_dir(all_test_files, :in_dir => options[:in_dir]).join(' ')
257
266
  else
258
267
  search_file(:pattern => options[:test_for][1], :in_dir => options[:in_dir]) if options.include?(:test_for)
259
268
  end
260
- end
261
- files = files.call
262
- # Fix fo Test::Unit - But this is not responsability of the Application instances - Refactoring this
263
- files = "#{test_framework.test_loader} #{files}" if test_framework.respond_to?(:test_loader)
264
- files
269
+ end
265
270
  end
266
271
 
267
272
  # Search files under the dir(s) specified
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 1
9
- version: 1.0.1
8
+ - 2
9
+ version: 1.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tomas D'Stefano