micro_test 0.0.3 → 0.0.4

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.
Files changed (2) hide show
  1. data/bin/mt +28 -0
  2. metadata +3 -2
data/bin/mt ADDED
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env ruby --
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), "..", "lib", "micro_test"))
4
+
5
+ path = ARGV[0].to_s.strip
6
+ path = File.expand_path(File.dirname(__FILE__)) if path.empty?
7
+
8
+ if path == "-h" || path == "--help"
9
+ puts "Runs MicroTest on the provided path."
10
+ puts "Usage:"
11
+ puts " $mt /path/to/test_file_or_dir"
12
+ exit
13
+ end
14
+
15
+ path = File.expand_path(File.join(__FILE__), path) unless File.exist?(path)
16
+ unless File.exist?(path)
17
+ puts "#{path} not found."
18
+ puts "Please check the path and try again."
19
+ exit
20
+ end
21
+
22
+ if File.directory?(path)
23
+ Dir[File.join(path, "**", "*.rb")].each { |p| require p }
24
+ else
25
+ require path
26
+ end
27
+
28
+ MicroTest::Runner.run
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: micro_test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-24 00:00:00.000000000 Z
12
+ date: 2012-09-25 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! ' A micro testing "framework".
15
15
 
@@ -21,6 +21,7 @@ extensions: []
21
21
  extra_rdoc_files: []
22
22
  files:
23
23
  - lib/micro_test.rb
24
+ - bin/mt
24
25
  homepage: https://github.com/hopsoft/micro_test
25
26
  licenses:
26
27
  - MIT