testme 0.4.8 → 0.4.9

Sign up to get free protection for your applications and to get access to all the features.
data/bin/testme CHANGED
@@ -21,7 +21,7 @@ TESTME_COLORS = :default]
21
21
 
22
22
  File.open('./test/app.test.rb', 'w') {|f| f.write(
23
23
  ""
24
- )} unless File.exists?("./.test/app#{TestMe::TESTME_SUFFIX}")
24
+ )} unless File.exists?("./.test/app.test.rb")
25
25
 
26
26
  puts 'Setup complete'
27
27
 
@@ -47,17 +47,18 @@ else
47
47
  @file = "#{Dir.pwd}/#{arg}"
48
48
 
49
49
  # Check if directory
50
- if File.directory? @file
50
+ if File.directory?(@file)
51
51
  Dir["#{@file}/**/*.rb"].each do |f|
52
- if @file.include? TestMe::TESTME_SUFFIX
52
+ if @file.include?(TestMe::TESTME_SUFFIX)
53
53
  testme do
54
54
  load @file
55
55
  end
56
56
  else
57
57
  load @file
58
58
  end
59
- elsif File.exists? @file
60
- if @file.include? TestMe::TESTME_SUFFIX
59
+ end
60
+ elsif File.exists?(@file)
61
+ if @file.include?(TestMe::TESTME_SUFFIX)
61
62
  testme do
62
63
  load @file
63
64
  end
@@ -66,7 +67,6 @@ else
66
67
  end
67
68
  end
68
69
  end
69
-
70
70
  end
71
71
 
72
72
  end
@@ -54,17 +54,17 @@ def testme █ end
54
54
  # Optional configuration
55
55
  # ---------------------------------------------------------------- #
56
56
  module TestMe
57
- TESTME_DIR = ::TESTME_DIR ? ::TESTME_DIR : '/test/'
57
+ TESTME_DIR = defined?(::TESTME_DIR) ? ::TESTME_DIR : '/test/'
58
58
  # default: '/test/'
59
59
 
60
- TESTME_SUFFIX = ::TESTME_SUFFIX ? ::TESTME_SUFFIX : '.test.rb'
60
+ TESTME_SUFFIX = defined?(::TESTME_SUFFIX) ? ::TESTME_SUFFIX : '.test.rb'
61
61
 
62
- TESTME_FORMAT = ::TESTME_FORMAT ? ::TESTME_FORMAT : :console
62
+ TESTME_FORMAT = defined?(::TESTME_FORMAT) ? ::TESTME_FORMAT : :console
63
63
  # choose how results are displayed
64
64
  # options: :none, :text, :console
65
65
  # default: :console
66
66
 
67
- TESTME_COLORS = ::TESTME_COLORS ? ::TESTME_COLORS : :default
67
+ TESTME_COLORS = defined?(::TESTME_COLORS) ? ::TESTME_COLORS : :default
68
68
  # color scheme for console output
69
69
  # options: :default
70
70
  # default: :default
@@ -1,3 +1,4 @@
1
+ TESTME_INIT = true
1
2
  TESTME_RUNNING = true
2
3
  TESTME_FORMAT = :none
3
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -56,7 +56,6 @@ files:
56
56
  - .gitignore
57
57
  - .rspec
58
58
  - .rvmrc
59
- - .testme
60
59
  - Gemfile
61
60
  - LICENSE
62
61
  - README.md
@@ -85,7 +84,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
85
84
  version: '0'
86
85
  segments:
87
86
  - 0
88
- hash: -630431999
87
+ hash: 286752561
89
88
  required_rubygems_version: !ruby/object:Gem::Requirement
90
89
  none: false
91
90
  requirements:
@@ -94,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
93
  version: '0'
95
94
  segments:
96
95
  - 0
97
- hash: -630431999
96
+ hash: 286752561
98
97
  requirements: []
99
98
  rubyforge_project:
100
99
  rubygems_version: 1.8.24
data/.testme DELETED
@@ -1,6 +0,0 @@
1
- require "testme"
2
-
3
- TESTME_DIR = '/test/'
4
- TESTME_SUFFIX = '.test.rb'
5
- TESTME_FORMAT = :console
6
- TESTME_COLORS = :default