matest 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 561537ac4f243f07f82db71412c6b2c33d5973c5
4
- data.tar.gz: 727f060832067bf531677a83f8b623329e513415
3
+ metadata.gz: 161f528b33af0462a93a283e4fed0a333fd6f8cb
4
+ data.tar.gz: 2c5a1a2bf62de2b4f9d283733297c5d274a756d5
5
5
  SHA512:
6
- metadata.gz: b8be26c780092220c71fdb57f70e287e1899a59e5d8f491f0ec34e5049cb2ca2ed82b3e5d528fae912754d9a6a630b9ee9f2d83d9615bb9c03b56ac3b517c8ed
7
- data.tar.gz: f3edc5feb003a2f69efd06f61f918e6a38775d63e847d6475f3eed10574d8d048a41af3a28ffb0165620bc53fdb74518a541fed34e4bc45ebbe6ad1bc90844f5
6
+ metadata.gz: 9489765c88e786a6f2f71c4f2206c9ca15fe0de9c35cd5537d2534d028226bc96473c875355a87e440ef3773403a97341ebf76a6a9cdc1f2a80c906463676ae9
7
+ data.tar.gz: f6266bf6ff5a21948f18767ac03821ba6404549c870f6eef3f679dcbcaad22d3c8f34a17667d43209fa26ff47bc9ea76994b885b237afeb719e1f6bc97a9efd4
data/Rakefile CHANGED
@@ -1,6 +1,16 @@
1
1
  require "bundler/gem_tasks"
2
2
 
3
3
  task default: :matest
4
+
5
+ task :spec do
6
+ arg_files = ENV["FILES"] && ENV["FILES"].split(/[\s,]+/)
7
+ all_files = Rake::FileList["./spec/matest_specs/**/*_spec.rb"]
8
+ files = arg_files || all_files
9
+ puts "\nRuning tests for: #{ files.join(" ") }\n\n"
10
+
11
+ system *["./bin/matest"].concat(files)
12
+ end
13
+
4
14
  task :matest do
5
15
  arg_files = ENV["FILES"] && ENV["FILES"].split(/[\s,]+/)
6
16
  all_files = Rake::FileList["./spec/matest_specs/**/*_spec.rb"]
@@ -7,12 +7,16 @@ module Matest
7
7
  module Configure
8
8
  module_function
9
9
 
10
- def use_color?
11
- @use_color ||= false
10
+ def color?
11
+ @color ||= false
12
12
  end
13
13
 
14
- def use_color=(use_color)
15
- @use_color = use_color
14
+ def color=(color)
15
+ @color = color
16
+ end
17
+
18
+ def use_color
19
+ @color = true
16
20
  end
17
21
  end
18
22
  end
@@ -7,7 +7,7 @@ module Matest
7
7
 
8
8
  Term::ANSIColor.attributes.each do |attr|
9
9
  define_method(attr) do |str|
10
- Matest::Configure.use_color? ? Term::ANSIColor.send(attr, str) : str
10
+ Matest::Configure.color? ? Term::ANSIColor.send(attr, str) : str
11
11
  end
12
12
  end
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module Matest
2
- VERSION = "1.3.1"
2
+ VERSION = "1.3.2"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  Matest.configure do |c|
2
- c.use_color = true
2
+ c.use_color
3
3
  end
4
4
 
5
5
  scope do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: matest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Iachetti