sauron 0.1.26 → 0.1.27

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.26
1
+ 0.1.27
@@ -4,11 +4,29 @@ case Sauron.framework
4
4
  when 'testunit'
5
5
  # Unit tests #
6
6
  watch('test/unit/(.*)_test\.rb'){|f| Sauron.run_pattern_tests 'test/unit/', f[1], '_test.rb'}
7
- watch('app/models/(.*)\.rb'){|f| Sauron.run_single_test "test/unit/#{f[1]}_test.rb"}
8
-
7
+ watch('app/models/(.*)\.rb') do |f|
8
+ files = Dir.glob("test/unit/*_#{f[1]}_test.rb")
9
+
10
+ if files.size == 1
11
+ Sauron.run_single_test files.first
12
+ else
13
+ Sauron.run_multiple_tests files
14
+ end
15
+ end
16
+
9
17
  # Functional tests #
10
18
  watch('test/functional/(.*)_controller_test\.rb'){|f| Sauron.run_pattern_tests 'test/functional/', f[1], '_controller_test.rb'}
11
- watch('app/controllers/(.*)\.rb'){|f| Sauron.run_single_test "test/functional/#{f[1]}_test.rb"}
19
+
20
+ watch('app/controllers/(.*)\.rb') do |f|
21
+ files = Dir.glob("test/functional/*_#{f[1]}_test.rb")
22
+
23
+ if files.size == 1
24
+ Sauron.run_single_test files.first
25
+ else
26
+ Sauron.run_multiple_tests files
27
+ end
28
+ end
29
+
12
30
  watch('app/views/(.*)/.*\.html.erb'){|f| Sauron.run_single_test "test/functional/#{f[1]}_controller_test.rb"}
13
31
 
14
32
  # Routing tests #
data/sauron.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sauron}
8
- s.version = "0.1.26"
8
+ s.version = "0.1.27"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jaime Bellmyer"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sauron
3
3
  version: !ruby/object:Gem::Version
4
- hash: 47
4
+ hash: 45
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 26
10
- version: 0.1.26
9
+ - 27
10
+ version: 0.1.27
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jaime Bellmyer