etest-unit 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module EtestUnit
2
- VERSION = "0.7.4"
2
+ VERSION = "0.7.5"
3
3
  end
data/lib/string_ext.rb CHANGED
@@ -8,7 +8,11 @@ class String
8
8
  downcase
9
9
  end
10
10
 
11
- def camelize
12
- gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
11
+ def camelize(first_letter = :upper)
12
+ camelized = gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
13
+ if first_letter == :lower
14
+ camelized.gsub!(/^./, &:downcase)
15
+ end
16
+ camelized
13
17
  end
14
18
  end
data/test/etest_test.rb CHANGED
@@ -25,6 +25,11 @@ module String::Etest
25
25
  assert_equal "X", "x".camelize
26
26
  assert_equal "XaLaNder", "xa_la_nder".camelize
27
27
  end
28
+
29
+ def test_camelize_lower
30
+ assert_equal "x", "x".camelize(:lower)
31
+ assert_equal "xaLaNder", "xa_la_nder".camelize(:lower)
32
+ end
28
33
  end
29
34
 
30
35
  module Fixnum::Etest
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: etest-unit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
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: 2013-05-21 00:00:00.000000000 Z
12
+ date: 2013-05-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: test-unit
@@ -53,7 +53,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
53
  version: '0'
54
54
  segments:
55
55
  - 0
56
- hash: 1658487212361329493
56
+ hash: 206565396900428233
57
57
  required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  none: false
59
59
  requirements: