duct_tape 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitattributes +56 -0
- data/Rakefile +35 -40
- data/VERSION +1 -1
- data/duct_tape.gemspec +9 -5
- data/lib/duct_tape/autoassociative_hash.rb +54 -0
- data/lib/ext/pathname.rb +1 -0
- data/spec/algorithms/containers/heap_spec.rb +12 -0
- data/spec/algorithms/containers/priority_queue_spec.rb +12 -0
- data/spec/duct_tape/autoassociative_array_spec.rb +69 -25
- data/spec/duct_tape/autoassociative_hash_spec.rb +107 -0
- data/spec/ext/array_spec.rb +91 -40
- data/spec/ext/datetime_spec.rb +4 -2
- data/spec/ext/dir_spec.rb +20 -10
- data/spec/ext/file_spec.rb +17 -4
- data/spec/ext/hash_spec.rb +48 -16
- data/spec/ext/kernel_spec.rb +138 -14
- data/spec/ext/numeric_spec.rb +27 -8
- data/spec/ext/object_spec.rb +8 -4
- data/spec/ext/pathname_spec.rb +92 -0
- data/spec/ext/range_spec.rb +4 -2
- data/spec/ext/regexp_spec.rb +4 -2
- data/spec/ext/string_spec.rb +43 -16
- data/spec/ext/symbol_spec.rb +4 -2
- data/spec/ext/time_spec.rb +8 -4
- data/spec/ext/uri_spec.rb +23 -6
- data/spec/spec_helper.rb +5 -0
- metadata +26 -41
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 41675ecda34ca568f08df0a857ae56674e18ee95
|
4
|
+
data.tar.gz: 02ffc1adfb8a907b5e7d53ac2e0c0ae19ba35e2d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 45090f67f4f8e3cd03f6d6d45ad369a49232c6fb86643d1f13d9e2a61a5553d0d650b9ff5f8059a500627cdd6bc2365d2ed97cece2802164f21b8e20bcd37347
|
7
|
+
data.tar.gz: e11c2a3a6680c5f965f260de31326cba18ce0eb2a9c8aac4c595018ea2651fcc6496addb6053c85418ea91d4fa47396a25b234a8bb0aeeca0f507ad69ff53a3e
|
data/.gitattributes
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
# Set default behaviour, in case users don't have core.autocrlf set.
|
2
|
+
* text=auto
|
3
|
+
|
4
|
+
# Explicitly declare text files we want to always be normalized and converted
|
5
|
+
# to native line endings on checkout.
|
6
|
+
*.c text
|
7
|
+
*.h text
|
8
|
+
*.rb text
|
9
|
+
*.ru text
|
10
|
+
*.sh text
|
11
|
+
*.erb text
|
12
|
+
*.html text
|
13
|
+
*.js text
|
14
|
+
*.css text
|
15
|
+
*.less text
|
16
|
+
*.yaml text
|
17
|
+
*.yml text
|
18
|
+
*.conf text
|
19
|
+
*.ini text
|
20
|
+
*.json text
|
21
|
+
*.xml text
|
22
|
+
*.plist text
|
23
|
+
*.rake text
|
24
|
+
*.md text
|
25
|
+
|
26
|
+
# Declare files that will always have CRLF line endings on checkout.
|
27
|
+
*.sln text eol=crlf
|
28
|
+
*.bat text eol=crlf
|
29
|
+
|
30
|
+
# Declare files that will always have LF line endings on checkout.
|
31
|
+
Gemfile.lock text eol=lf
|
32
|
+
|
33
|
+
# Denote all files that are truly binary and should not be modified.
|
34
|
+
*.png binary
|
35
|
+
*.jpg binary
|
36
|
+
*.jpeg binary
|
37
|
+
*.gif binary
|
38
|
+
*.eot binary
|
39
|
+
*.svg binary
|
40
|
+
*.ttf binary
|
41
|
+
*.woff binary
|
42
|
+
*.cur binary
|
43
|
+
*.xpm binary
|
44
|
+
*.ico binary
|
45
|
+
*.icns binary
|
46
|
+
*.dll binary
|
47
|
+
*.sfx binary
|
48
|
+
*.rdb binary
|
49
|
+
*.couch binary
|
50
|
+
*.7z binary
|
51
|
+
*.pkl binary
|
52
|
+
*.json binary
|
53
|
+
*.zip binary
|
54
|
+
*.tar.* binary
|
55
|
+
*.tgz binary
|
56
|
+
VERSION binary
|
data/Rakefile
CHANGED
@@ -25,9 +25,11 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
|
|
25
25
|
spec.pattern = FileList['spec/**/*_spec.rb']
|
26
26
|
end
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
if RUBY_VERSION < "1.9"
|
29
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
30
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
31
|
+
spec.rcov = true
|
32
|
+
end
|
31
33
|
end
|
32
34
|
|
33
35
|
begin
|
@@ -38,6 +40,7 @@ end
|
|
38
40
|
|
39
41
|
desc "Check syntax for all project files"
|
40
42
|
task :syntax do
|
43
|
+
puts "Running syntax checks..."
|
41
44
|
types = {
|
42
45
|
"yaml" => [{
|
43
46
|
:cmd => %q{ruby -ryaml -e "begin; YAML::load(IO.read('%s')); rescue Exception => e; raise if e.is_a?(SyntaxError); end"}
|
@@ -96,50 +99,42 @@ task :syntax do
|
|
96
99
|
|
97
100
|
if syntax_error_found
|
98
101
|
fail "Syntax Errors found!"
|
99
|
-
else
|
100
|
-
puts "Everything seems alright. Try running tests!"
|
101
102
|
end
|
102
103
|
end
|
103
104
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
105
|
+
namespace :version do
|
106
|
+
desc "Increment patch version"
|
107
|
+
task :patch do
|
108
|
+
puts "Old Version: #{VERSION_STRING}"
|
109
|
+
File.open(VERSION_FILE, "w") do |f|
|
110
|
+
f.write(VERSION_STRING.sub!(/^(\d+)\.(\d+)\.(\d+)$/) { |s| "#{$1}.#{$2}.#{$3.to_i + 1}" })
|
111
|
+
end
|
112
|
+
commit_msg = "New Version: #{VERSION_STRING}"
|
113
|
+
sh "git commit -m #{commit_msg.inspect} #{(VERSION_FILE).to_s.inspect}"
|
114
|
+
sh "git checkout -- #{(VERSION_FILE).to_s.inspect}"
|
109
115
|
end
|
110
|
-
commit_msg = "New Version: #{VERSION_STRING}"
|
111
|
-
sh "git commit -m #{commit_msg.inspect} #{(VERSION_FILE).to_s.inspect}"
|
112
|
-
sh "git checkout -- #{(VERSION_FILE).to_s.inspect}"
|
113
|
-
end
|
114
116
|
|
115
|
-
desc "Increment minor version"
|
116
|
-
task :
|
117
|
-
|
118
|
-
|
119
|
-
|
117
|
+
desc "Increment minor version"
|
118
|
+
task :minor do
|
119
|
+
puts "Old Version: #{VERSION_STRING}"
|
120
|
+
File.open(VERSION_FILE, "w") do |f|
|
121
|
+
f.write(VERSION_STRING.sub!(/^(\d+)\.(\d+)\.(\d+)$/) { |s| "#{$1}.#{$2.to_i + 1}.0" })
|
122
|
+
end
|
123
|
+
commit_msg = "New Version: #{VERSION_STRING}"
|
124
|
+
sh "git commit -m #{commit_msg.inspect} #{(VERSION_FILE).to_s.inspect}"
|
125
|
+
sh "git checkout -- #{(VERSION_FILE).to_s.inspect}"
|
120
126
|
end
|
121
|
-
commit_msg = "New Version: #{VERSION_STRING}"
|
122
|
-
sh "git commit -m #{commit_msg.inspect} #{(VERSION_FILE).to_s.inspect}"
|
123
|
-
sh "git checkout -- #{(VERSION_FILE).to_s.inspect}"
|
124
|
-
end
|
125
127
|
|
126
|
-
desc "Increment major version"
|
127
|
-
task :
|
128
|
-
|
129
|
-
|
130
|
-
|
128
|
+
desc "Increment major version"
|
129
|
+
task :major do
|
130
|
+
puts "Old Version: #{VERSION_STRING}"
|
131
|
+
File.open(VERSION_FILE, "w") do |f|
|
132
|
+
f.write(VERSION_STRING.sub!(/^(\d+)\.(\d+)\.(\d+)$/) { |s| "#{$1.to_i + 1}.0.0" })
|
133
|
+
end
|
134
|
+
commit_msg = "New Version: #{VERSION_STRING}"
|
135
|
+
sh "git commit -m #{commit_msg.inspect} #{(VERSION_FILE).to_s.inspect}"
|
136
|
+
sh "git checkout -- #{(VERSION_FILE).to_s.inspect}"
|
131
137
|
end
|
132
|
-
commit_msg = "New Version: #{VERSION_STRING}"
|
133
|
-
sh "git commit -m #{commit_msg.inspect} #{(VERSION_FILE).to_s.inspect}"
|
134
|
-
sh "git checkout -- #{(VERSION_FILE).to_s.inspect}"
|
135
|
-
end
|
136
|
-
|
137
|
-
desc "Finalize release (tag & increment version)"
|
138
|
-
task :release do
|
139
|
-
puts "Tagging release version: #{VERSION_STRING}"
|
140
|
-
sh "git tag v#{VERSION_STRING}"
|
141
|
-
sh "git push --tags"
|
142
|
-
Rake::Task[:bump_patch_version].invoke
|
143
138
|
end
|
144
139
|
|
145
|
-
task :default => :spec
|
140
|
+
task :default => [:syntax, :spec]
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/duct_tape.gemspec
CHANGED
@@ -2,14 +2,15 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: duct_tape 0.2.0 ruby lib
|
5
6
|
|
6
7
|
Gem::Specification.new do |s|
|
7
8
|
s.name = "duct_tape"
|
8
|
-
s.version = "0.
|
9
|
+
s.version = "0.2.0"
|
9
10
|
|
10
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
12
|
s.authors = ["Tim Rodriguez"]
|
12
|
-
s.date = "2014-06-
|
13
|
+
s.date = "2014-06-21"
|
13
14
|
s.description = "A general-purpose utility library for Ruby"
|
14
15
|
s.email = ["tw.rodriguez@gmail.com"]
|
15
16
|
s.extensions = ["ext/mkrf_conf.rb"]
|
@@ -18,10 +19,12 @@ Gem::Specification.new do |s|
|
|
18
19
|
"README.md"
|
19
20
|
]
|
20
21
|
s.files = [
|
22
|
+
".gitattributes",
|
21
23
|
"Gemfile",
|
22
24
|
"Gemfile.lock",
|
23
25
|
"LICENSE",
|
24
26
|
"README.md",
|
27
|
+
"REQUIRED_FILES",
|
25
28
|
"Rakefile",
|
26
29
|
"VERSION",
|
27
30
|
"duct_tape.gemspec",
|
@@ -31,6 +34,7 @@ Gem::Specification.new do |s|
|
|
31
34
|
"lib/algorithms/containers/priority_queue.rb",
|
32
35
|
"lib/duct_tape.rb",
|
33
36
|
"lib/duct_tape/autoassociative_array.rb",
|
37
|
+
"lib/duct_tape/autoassociative_hash.rb",
|
34
38
|
"lib/ext/array.rb",
|
35
39
|
"lib/ext/boolean.rb",
|
36
40
|
"lib/ext/datetime.rb",
|
@@ -50,6 +54,7 @@ Gem::Specification.new do |s|
|
|
50
54
|
"spec/algorithms/containers/heap_spec.rb",
|
51
55
|
"spec/algorithms/containers/priority_queue_spec.rb",
|
52
56
|
"spec/duct_tape/autoassociative_array_spec.rb",
|
57
|
+
"spec/duct_tape/autoassociative_hash_spec.rb",
|
53
58
|
"spec/ext/array_spec.rb",
|
54
59
|
"spec/ext/boolean_spec.rb",
|
55
60
|
"spec/ext/datetime_spec.rb",
|
@@ -72,11 +77,11 @@ Gem::Specification.new do |s|
|
|
72
77
|
s.licenses = ["Simplified BSD"]
|
73
78
|
s.require_paths = ["lib"]
|
74
79
|
s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
|
75
|
-
s.rubygems_version = "1.
|
80
|
+
s.rubygems_version = "2.1.11"
|
76
81
|
s.summary = "A bunch of useful patches for core Ruby classes"
|
77
82
|
|
78
83
|
if s.respond_to? :specification_version then
|
79
|
-
s.specification_version =
|
84
|
+
s.specification_version = 4
|
80
85
|
|
81
86
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
82
87
|
s.add_runtime_dependency(%q<facets>, [">= 2.9.3"])
|
@@ -108,4 +113,3 @@ Gem::Specification.new do |s|
|
|
108
113
|
s.add_dependency(%q<simplecov>, [">= 0"])
|
109
114
|
end
|
110
115
|
end
|
111
|
-
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module Containers
|
2
|
+
class AutoassociativeHash
|
3
|
+
def initialize(&block)
|
4
|
+
@mapping_block = block_given? ? block : nil
|
5
|
+
@auto_array = Containers::AutoassociativeArray.new
|
6
|
+
@hash = {}
|
7
|
+
@values = {}
|
8
|
+
self
|
9
|
+
end
|
10
|
+
|
11
|
+
def [](key)
|
12
|
+
mapped_key = @mapping_block ? @mapping_block[key] : key
|
13
|
+
match = @auto_array.partial_match(*mapped_key)
|
14
|
+
@values[match]
|
15
|
+
end
|
16
|
+
|
17
|
+
def []=(key, val)
|
18
|
+
mapped_key = @mapping_block[key]
|
19
|
+
@hash[key] = val
|
20
|
+
@auto_array.insert(*mapped_key)
|
21
|
+
@values[mapped_key] = val
|
22
|
+
end
|
23
|
+
|
24
|
+
def empty?
|
25
|
+
@hash.empty?
|
26
|
+
end
|
27
|
+
|
28
|
+
def length
|
29
|
+
@hash.size
|
30
|
+
end
|
31
|
+
alias_method :size, :length
|
32
|
+
|
33
|
+
def clear
|
34
|
+
@hash.clear
|
35
|
+
@values.clear
|
36
|
+
@auto_array.clear
|
37
|
+
self
|
38
|
+
end
|
39
|
+
|
40
|
+
def inspect
|
41
|
+
@hash.inspect
|
42
|
+
end
|
43
|
+
|
44
|
+
def to_s
|
45
|
+
@hash.to_s
|
46
|
+
end
|
47
|
+
|
48
|
+
def dup
|
49
|
+
ret = self.class.new(&@mapping_block)
|
50
|
+
@hash.each { |key,val| ret[key] = val }
|
51
|
+
ret
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
data/lib/ext/pathname.rb
CHANGED
@@ -4,16 +4,28 @@ require File.join(File.dirname(__FILE__), "..", "..", "spec_helper.rb")
|
|
4
4
|
# Containers::Heap#to_a
|
5
5
|
#
|
6
6
|
describe Containers::Heap, "#to_a" do
|
7
|
+
it "should have the method defined" do
|
8
|
+
expect(Containers::Heap.method_defined?(:to_a)).to be(true)
|
9
|
+
end
|
10
|
+
|
7
11
|
it "remains unchanged" do
|
8
12
|
# TODO
|
9
13
|
end
|
14
|
+
|
15
|
+
pending "More tests"
|
10
16
|
end
|
11
17
|
|
12
18
|
#
|
13
19
|
# Containers::Heap#each
|
14
20
|
#
|
15
21
|
describe Containers::Heap, "#each" do
|
22
|
+
it "should have the method defined" do
|
23
|
+
expect(Containers::Heap.method_defined?(:each)).to be(true)
|
24
|
+
end
|
25
|
+
|
16
26
|
it "remains unchanged" do
|
17
27
|
# TODO
|
18
28
|
end
|
29
|
+
|
30
|
+
pending "More tests"
|
19
31
|
end
|
@@ -4,16 +4,28 @@ require File.join(File.dirname(__FILE__), "..", "..", "spec_helper.rb")
|
|
4
4
|
# Containers::PriorityQueue#to_a
|
5
5
|
#
|
6
6
|
describe Containers::PriorityQueue, "#to_a" do
|
7
|
+
it "should have the method defined" do
|
8
|
+
expect(Containers::PriorityQueue.method_defined?(:to_a)).to be(true)
|
9
|
+
end
|
10
|
+
|
7
11
|
it "remains unchanged" do
|
8
12
|
# TODO
|
9
13
|
end
|
14
|
+
|
15
|
+
pending "More tests"
|
10
16
|
end
|
11
17
|
|
12
18
|
#
|
13
19
|
# Containers::PriorityQueue#each
|
14
20
|
#
|
15
21
|
describe Containers::PriorityQueue, "#each" do
|
22
|
+
it "should have the method defined" do
|
23
|
+
expect(Containers::PriorityQueue.method_defined?(:each)).to be(true)
|
24
|
+
end
|
25
|
+
|
16
26
|
it "remains unchanged" do
|
17
27
|
# TODO
|
18
28
|
end
|
29
|
+
|
30
|
+
pending "More tests"
|
19
31
|
end
|
@@ -4,27 +4,29 @@ require File.join(File.dirname(__FILE__), "..", "spec_helper.rb")
|
|
4
4
|
# Containers::AutoassociativeArray#initialize
|
5
5
|
#
|
6
6
|
describe Containers::AutoassociativeArray, "#initialize" do
|
7
|
-
|
8
|
-
# TODO
|
9
|
-
end
|
7
|
+
pending "More tests"
|
10
8
|
end
|
11
9
|
|
12
10
|
#
|
13
11
|
# Containers::AutoassociativeArray#insert
|
14
12
|
#
|
15
13
|
describe Containers::AutoassociativeArray, "#insert" do
|
16
|
-
it "
|
17
|
-
|
14
|
+
it "should have the method defined" do
|
15
|
+
expect(Containers::AutoassociativeArray.method_defined?(:insert)).to be(true)
|
18
16
|
end
|
17
|
+
|
18
|
+
pending "More tests"
|
19
19
|
end
|
20
20
|
|
21
21
|
#
|
22
22
|
# Containers::AutoassociativeArray#<<
|
23
23
|
#
|
24
24
|
describe Containers::AutoassociativeArray, "#<<" do
|
25
|
-
it "
|
26
|
-
|
25
|
+
it "should have the method defined" do
|
26
|
+
expect(Containers::AutoassociativeArray.method_defined?(:<<)).to be(true)
|
27
27
|
end
|
28
|
+
|
29
|
+
pending "More tests"
|
28
30
|
end
|
29
31
|
|
30
32
|
#
|
@@ -55,85 +57,127 @@ describe Containers::AutoassociativeArray, "#partial_match" do
|
|
55
57
|
expect(aa.partial_match(1,4)).to eq([[2,3,4], [3,4,5]])
|
56
58
|
expect(aa.partial_match(2,5)).to eq([[1,2,3], [2,3,4]])
|
57
59
|
end
|
60
|
+
|
61
|
+
pending "More tests"
|
58
62
|
end
|
59
63
|
|
60
64
|
#
|
61
65
|
# Containers::AutoassociativeArray#[]
|
62
66
|
#
|
63
67
|
describe Containers::AutoassociativeArray, "#[]" do
|
64
|
-
it "
|
65
|
-
|
68
|
+
it "should have the method defined" do
|
69
|
+
expect(Containers::AutoassociativeArray.method_defined?(:[])).to be(true)
|
66
70
|
end
|
71
|
+
|
72
|
+
pending "More tests"
|
67
73
|
end
|
68
74
|
|
69
75
|
#
|
70
76
|
# Containers::AutoassociativeArray#by_column
|
71
77
|
#
|
72
78
|
describe Containers::AutoassociativeArray, "#by_column" do
|
73
|
-
it "
|
74
|
-
|
79
|
+
it "should have the method defined" do
|
80
|
+
expect(Containers::AutoassociativeArray.method_defined?(:by_column)).to be(true)
|
75
81
|
end
|
82
|
+
|
83
|
+
pending "More tests"
|
76
84
|
end
|
77
85
|
|
78
86
|
#
|
79
87
|
# Containers::AutoassociativeArray#empty?
|
80
88
|
#
|
81
89
|
describe Containers::AutoassociativeArray, "#empty?" do
|
82
|
-
it "
|
83
|
-
|
90
|
+
it "should have the method defined" do
|
91
|
+
expect(Containers::AutoassociativeArray.method_defined?(:empty?)).to be(true)
|
84
92
|
end
|
93
|
+
|
94
|
+
pending "More tests"
|
85
95
|
end
|
86
96
|
|
87
97
|
#
|
88
98
|
# Containers::AutoassociativeArray#length
|
89
99
|
#
|
90
100
|
describe Containers::AutoassociativeArray, "#length" do
|
91
|
-
it "
|
92
|
-
|
101
|
+
it "should have the method defined" do
|
102
|
+
expect(Containers::AutoassociativeArray.method_defined?(:length)).to be(true)
|
93
103
|
end
|
104
|
+
|
105
|
+
pending "More tests"
|
94
106
|
end
|
95
107
|
|
96
108
|
#
|
97
109
|
# Containers::AutoassociativeArray#size
|
98
110
|
#
|
99
111
|
describe Containers::AutoassociativeArray, "#size" do
|
100
|
-
it "
|
101
|
-
|
112
|
+
it "should have the method defined" do
|
113
|
+
expect(Containers::AutoassociativeArray.method_defined?(:size)).to be(true)
|
102
114
|
end
|
115
|
+
|
116
|
+
pending "More tests"
|
103
117
|
end
|
104
118
|
|
105
119
|
#
|
106
120
|
# Containers::AutoassociativeArray#clear
|
107
121
|
#
|
108
122
|
describe Containers::AutoassociativeArray, "#clear" do
|
109
|
-
it "
|
110
|
-
|
123
|
+
it "should have the method defined" do
|
124
|
+
expect(Containers::AutoassociativeArray.method_defined?(:clear)).to be(true)
|
111
125
|
end
|
126
|
+
|
127
|
+
pending "More tests"
|
112
128
|
end
|
113
129
|
|
114
130
|
#
|
115
131
|
# Containers::AutoassociativeArray#inspect
|
116
132
|
#
|
117
133
|
describe Containers::AutoassociativeArray, "#inspect" do
|
118
|
-
it "
|
119
|
-
|
134
|
+
it "should have the method defined" do
|
135
|
+
expect(Containers::AutoassociativeArray.method_defined?(:inspect)).to be(true)
|
120
136
|
end
|
137
|
+
|
138
|
+
pending "More tests"
|
121
139
|
end
|
122
140
|
|
123
141
|
#
|
124
142
|
# Containers::AutoassociativeArray#to_s
|
125
143
|
#
|
126
144
|
describe Containers::AutoassociativeArray, "#to_s" do
|
127
|
-
it "
|
128
|
-
|
145
|
+
it "should have the method defined" do
|
146
|
+
expect(Containers::AutoassociativeArray.method_defined?(:to_s)).to be(true)
|
129
147
|
end
|
148
|
+
|
149
|
+
pending "More tests"
|
130
150
|
end
|
131
151
|
|
132
152
|
#
|
133
153
|
# Containers::AutoassociativeArray#dup
|
134
154
|
#
|
135
155
|
describe Containers::AutoassociativeArray, "#dup" do
|
136
|
-
it "
|
137
|
-
|
156
|
+
it "should have the method defined" do
|
157
|
+
expect(Containers::AutoassociativeArray.method_defined?(:dup)).to be(true)
|
158
|
+
end
|
159
|
+
|
160
|
+
pending "More tests"
|
161
|
+
end
|
162
|
+
|
163
|
+
#
|
164
|
+
# Containers::AutoassociativeArray#rebuild_hash
|
165
|
+
#
|
166
|
+
describe Containers::AutoassociativeArray, "#rebuild_hash" do
|
167
|
+
it "should have the method defined" do
|
168
|
+
expect(Containers::AutoassociativeArray.private_method_defined?(:rebuild_hash)).to be(true)
|
169
|
+
end
|
170
|
+
|
171
|
+
pending "More tests"
|
172
|
+
end
|
173
|
+
|
174
|
+
#
|
175
|
+
# Containers::AutoassociativeArray#match_impl
|
176
|
+
#
|
177
|
+
describe Containers::AutoassociativeArray, "#match_impl" do
|
178
|
+
it "should have the method defined" do
|
179
|
+
expect(Containers::AutoassociativeArray.private_method_defined?(:match_impl)).to be(true)
|
138
180
|
end
|
181
|
+
|
182
|
+
pending "More tests"
|
139
183
|
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "..", "spec_helper.rb")
|
2
|
+
|
3
|
+
#
|
4
|
+
# Containers::AutoassociativeHash#initialize
|
5
|
+
#
|
6
|
+
describe Containers::AutoassociativeHash, "#initialize" do
|
7
|
+
pending "More tests"
|
8
|
+
end
|
9
|
+
|
10
|
+
#
|
11
|
+
# Containers::AutoassociativeHash#[]
|
12
|
+
#
|
13
|
+
describe Containers::AutoassociativeHash, "#[]" do
|
14
|
+
it "should have the method defined" do
|
15
|
+
expect(Containers::AutoassociativeHash.method_defined?(:[])).to be(true)
|
16
|
+
end
|
17
|
+
|
18
|
+
pending "More tests"
|
19
|
+
end
|
20
|
+
|
21
|
+
#
|
22
|
+
# Containers::AutoassociativeHash#[]=
|
23
|
+
#
|
24
|
+
describe Containers::AutoassociativeHash, "#[]=" do
|
25
|
+
it "should have the method defined" do
|
26
|
+
expect(Containers::AutoassociativeHash.method_defined?(:[]=)).to be(true)
|
27
|
+
end
|
28
|
+
|
29
|
+
pending "More tests"
|
30
|
+
end
|
31
|
+
|
32
|
+
#
|
33
|
+
# Containers::AutoassociativeHash#empty?
|
34
|
+
#
|
35
|
+
describe Containers::AutoassociativeHash, "#empty?" do
|
36
|
+
it "should have the method defined" do
|
37
|
+
expect(Containers::AutoassociativeHash.method_defined?(:empty?)).to be(true)
|
38
|
+
end
|
39
|
+
|
40
|
+
pending "More tests"
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# Containers::AutoassociativeHash#length
|
45
|
+
#
|
46
|
+
describe Containers::AutoassociativeHash, "#length" do
|
47
|
+
it "should have the method defined" do
|
48
|
+
expect(Containers::AutoassociativeHash.method_defined?(:length)).to be(true)
|
49
|
+
end
|
50
|
+
|
51
|
+
pending "More tests"
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Containers::AutoassociativeHash#size
|
56
|
+
#
|
57
|
+
describe Containers::AutoassociativeHash, "#size" do
|
58
|
+
it "should have the method defined" do
|
59
|
+
expect(Containers::AutoassociativeHash.method_defined?(:size)).to be(true)
|
60
|
+
end
|
61
|
+
|
62
|
+
pending "More tests"
|
63
|
+
end
|
64
|
+
|
65
|
+
#
|
66
|
+
# Containers::AutoassociativeHash#clear
|
67
|
+
#
|
68
|
+
describe Containers::AutoassociativeHash, "#clear" do
|
69
|
+
it "should have the method defined" do
|
70
|
+
expect(Containers::AutoassociativeHash.method_defined?(:clear)).to be(true)
|
71
|
+
end
|
72
|
+
|
73
|
+
pending "More tests"
|
74
|
+
end
|
75
|
+
|
76
|
+
#
|
77
|
+
# Containers::AutoassociativeHash#inspect
|
78
|
+
#
|
79
|
+
describe Containers::AutoassociativeHash, "#inspect" do
|
80
|
+
it "should have the method defined" do
|
81
|
+
expect(Containers::AutoassociativeHash.method_defined?(:inspect)).to be(true)
|
82
|
+
end
|
83
|
+
|
84
|
+
pending "More tests"
|
85
|
+
end
|
86
|
+
|
87
|
+
#
|
88
|
+
# Containers::AutoassociativeHash#to_s
|
89
|
+
#
|
90
|
+
describe Containers::AutoassociativeHash, "#to_s" do
|
91
|
+
it "should have the method defined" do
|
92
|
+
expect(Containers::AutoassociativeHash.method_defined?(:to_s)).to be(true)
|
93
|
+
end
|
94
|
+
|
95
|
+
pending "More tests"
|
96
|
+
end
|
97
|
+
|
98
|
+
#
|
99
|
+
# Containers::AutoassociativeHash#dup
|
100
|
+
#
|
101
|
+
describe Containers::AutoassociativeHash, "#dup" do
|
102
|
+
it "should have the method defined" do
|
103
|
+
expect(Containers::AutoassociativeHash.method_defined?(:dup)).to be(true)
|
104
|
+
end
|
105
|
+
|
106
|
+
pending "More tests"
|
107
|
+
end
|