jstdutil 0.3.11 → 0.3.12

Sign up to get free protection for your applications and to get access to all the features.
data/Changelog CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.3.12 / 2012-01-26
2
+ * Recognize camelized file names always...
3
+
1
4
  == 0.3.11 / 2012-01-26
2
5
  * Recognize camelized file names (i.e. some.js -> someTest.js)
3
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.11
1
+ 0.3.12
@@ -12,7 +12,7 @@ module Jstdutil
12
12
  def test_files
13
13
  return @test_files if @test_files
14
14
 
15
- if @file =~ /([-_]test[^\/]+)|([^\/]+[-_]test)\.js/
15
+ if @file =~ /([-_]test[^\/]+)|([^\/]+[-_]test)|(Test)\.js/
16
16
  @test_files = [@file]
17
17
  else
18
18
  name = File.basename(@file).gsub(/([-_]test)|(test[-_])|(\.js)/, "")
@@ -11,6 +11,20 @@ class TestFileTest < Test::Unit::TestCase
11
11
  assert_equal [file], test_file.test_files
12
12
  end
13
13
 
14
+ should "be file itself if name is like -test.js" do
15
+ file = "some-test.js"
16
+ test_file = Jstdutil::TestFile.new(file)
17
+
18
+ assert_equal [file], test_file.test_files
19
+ end
20
+
21
+ should "be file itself if name is like abcTest.js" do
22
+ file = "someThingTest.js"
23
+ test_file = Jstdutil::TestFile.new(file)
24
+
25
+ assert_equal [file], test_file.test_files
26
+ end
27
+
14
28
  should "find files like _test.js" do
15
29
  file = "some.js"
16
30
  test_file = Jstdutil::TestFile.new(file)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jstdutil
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 11
10
- version: 0.3.11
9
+ - 12
10
+ version: 0.3.12
11
11
  platform: ruby
12
12
  authors:
13
13
  - Christian Johansen