rbbt-util 4.1.0 → 4.2.0

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.
@@ -15,7 +15,7 @@ end
15
15
  class TestChaimMethods < Test::Unit::TestCase
16
16
  def test_chained_reverse_get
17
17
  a = ["test", "TEST"]
18
- TestChainedModule.setup_chain(a)
18
+ a.extend TestChainedModule
19
19
  assert_equal "test".reverse, a[0]
20
20
  assert_equal "TEST".reverse, a[1]
21
21
  end
@@ -96,6 +96,7 @@ class TestMisc < Test::Unit::TestCase
96
96
  a = [[1],[2]]
97
97
  a = NamedArray.setup a, %w(1 2)
98
98
  a.merge [3,4]
99
+ ddd a
99
100
  assert_equal [1,3], a[0]
100
101
  end
101
102
 
@@ -141,6 +142,15 @@ class TestMisc < Test::Unit::TestCase
141
142
  assert_equal nil, inputs[:four]
142
143
  end
143
144
 
145
+ def test_mean
146
+ assert_equal 2, Misc.mean([1,2,3])
147
+ assert_equal 3, Misc.mean([1,2,3,4,5])
148
+ end
149
+
150
+ def __test_sd
151
+ assert_equal Math.sqrt(2), Misc.sd([1,3])
152
+ end
153
+
144
154
  # def test_divide
145
155
  # assert_equal 2, Misc.divide(%w(1 2 3 4 5 6 7 8 9),2).length
146
156
  # end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-util
3
3
  version: !ruby/object:Gem::Version
4
- hash: 59
4
+ hash: 55
5
5
  prerelease:
6
6
  segments:
7
7
  - 4
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 4.1.0
10
+ version: 4.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Miguel Vazquez
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-17 00:00:00 +01:00
18
+ date: 2012-01-13 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -160,6 +160,7 @@ files:
160
160
  - lib/rbbt/util/filecache.rb
161
161
  - lib/rbbt/util/log.rb
162
162
  - lib/rbbt/util/misc.rb
163
+ - lib/rbbt/util/named_array.rb
163
164
  - lib/rbbt/util/open.rb
164
165
  - lib/rbbt/util/simpleDSL.rb
165
166
  - lib/rbbt/util/simpleopt.rb