riak-client 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/README.markdown +55 -12
  3. data/RELEASE_NOTES.md +20 -1
  4. data/lib/riak.rb +1 -0
  5. data/lib/riak/client.rb +2 -1
  6. data/lib/riak/client/beefcake/crdt/counter_loader.rb +18 -0
  7. data/lib/riak/client/beefcake/crdt/map_loader.rb +64 -0
  8. data/lib/riak/client/beefcake/crdt/set_loader.rb +18 -0
  9. data/lib/riak/client/beefcake/crdt_loader.rb +16 -59
  10. data/lib/riak/client/beefcake/crdt_operator.rb +2 -1
  11. data/lib/riak/client/instrumentation.rb +19 -0
  12. data/lib/riak/crdt/base.rb +16 -0
  13. data/lib/riak/errors/backend_creation.rb +9 -0
  14. data/lib/riak/instrumentation.rb +6 -0
  15. data/lib/riak/version.rb +1 -1
  16. data/riak-client.gemspec +3 -2
  17. data/spec/integration/riak/counters_spec.rb +1 -1
  18. data/spec/integration/riak/crdt_spec.rb +68 -23
  19. data/spec/integration/riak/protobuffs_backends_spec.rb +1 -1
  20. data/spec/integration/riak/threading_spec.rb +4 -4
  21. data/spec/integration/yokozuna/index_spec.rb +5 -5
  22. data/spec/integration/yokozuna/queries_spec.rb +15 -16
  23. data/spec/integration/yokozuna/schema_spec.rb +2 -2
  24. data/spec/riak/beefcake_protobuffs_backend/crdt_operator_spec.rb +8 -8
  25. data/spec/riak/beefcake_protobuffs_backend/object_methods_spec.rb +1 -1
  26. data/spec/riak/beefcake_protobuffs_backend_spec.rb +8 -8
  27. data/spec/riak/bucket_spec.rb +38 -38
  28. data/spec/riak/client_spec.rb +26 -27
  29. data/spec/riak/core_ext/to_param_spec.rb +2 -2
  30. data/spec/riak/counter_spec.rb +11 -11
  31. data/spec/riak/crdt/counter_spec.rb +4 -2
  32. data/spec/riak/crdt/inner_counter_spec.rb +1 -1
  33. data/spec/riak/crdt/inner_flag_spec.rb +4 -4
  34. data/spec/riak/crdt/inner_map_spec.rb +3 -3
  35. data/spec/riak/crdt/inner_register_spec.rb +5 -5
  36. data/spec/riak/crdt/inner_set_spec.rb +1 -1
  37. data/spec/riak/crdt/map_spec.rb +2 -2
  38. data/spec/riak/crdt/set_spec.rb +4 -2
  39. data/spec/riak/crdt/shared_examples.rb +15 -15
  40. data/spec/riak/crdt/typed_collection_spec.rb +16 -22
  41. data/spec/riak/escape_spec.rb +10 -10
  42. data/spec/riak/feature_detection_spec.rb +1 -1
  43. data/spec/riak/index_collection_spec.rb +7 -4
  44. data/spec/riak/instrumentation_spec.rb +124 -0
  45. data/spec/riak/link_spec.rb +12 -12
  46. data/spec/riak/list_buckets_spec.rb +2 -2
  47. data/spec/riak/map_reduce/filter_builder_spec.rb +5 -5
  48. data/spec/riak/map_reduce/phase_spec.rb +20 -20
  49. data/spec/riak/map_reduce_spec.rb +50 -50
  50. data/spec/riak/multiget_spec.rb +5 -5
  51. data/spec/riak/node_spec.rb +3 -3
  52. data/spec/riak/robject_spec.rb +46 -45
  53. data/spec/riak/search_spec.rb +11 -11
  54. data/spec/riak/secondary_index_spec.rb +9 -9
  55. data/spec/riak/stamp_spec.rb +5 -5
  56. data/spec/riak/walk_spec_spec.rb +30 -30
  57. data/spec/spec_helper.rb +6 -0
  58. data/spec/support/certs/ca.crt +19 -20
  59. data/spec/support/certs/client.crl +13 -0
  60. data/spec/support/certs/client.crt +68 -69
  61. data/spec/support/certs/client.csr +18 -0
  62. data/spec/support/certs/client.key +25 -25
  63. data/spec/support/certs/server.crl +11 -11
  64. data/spec/support/certs/server.crt +68 -69
  65. data/spec/support/certs/server.key +25 -25
  66. data/spec/support/unified_backend_examples.rb +33 -33
  67. metadata +31 -5
@@ -2,13 +2,13 @@
2
2
  describe Riak do
3
3
  require 'riak/core_ext/to_param'
4
4
 
5
- it "should do param conversion correctly" do
5
+ it "converts params correctly" do
6
6
  expect({ :name => 'David', :nationality => 'Danish' }.to_param).to eq("name=David&nationality=Danish")
7
7
  end
8
8
 
9
9
  # Based on the activesupport implementation.
10
10
  # https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/object/to_param.rb
11
- it "should do param conversion correctly with a namespace" do
11
+ it "converts namespaced params correctly" do
12
12
  expect({ :name => 'David', :nationality => 'Danish' }.to_param('user')).to eq("user%5Bname%5D=David&user%5Bnationality%5D=Danish")
13
13
  end
14
14
 
@@ -10,13 +10,13 @@ describe Riak::Counter do
10
10
  allow(@bucket).to receive('is_a?').and_return(true)
11
11
  end
12
12
 
13
- it "should set the bucket and key" do
13
+ it "sets the bucket and key" do
14
14
  ctr = Riak::Counter.new @bucket, @key
15
15
  expect(ctr.bucket).to eq(@bucket)
16
16
  expect(ctr.key).to eq(@key)
17
17
  end
18
18
 
19
- it "should require allow_mult" do
19
+ it "requires allow_mult" do
20
20
  @bad_bucket = Riak::Bucket.allocate
21
21
  allow(@bad_bucket).to receive(:allow_mult).and_return(false)
22
22
  allow(@bad_bucket).to receive(:client).and_return(double('client'))
@@ -44,37 +44,37 @@ describe Riak::Counter do
44
44
  @increment_expectation = proc{|n| expect(@backend).to receive(:post_counter).with(@bucket, @key, n, {})}
45
45
  end
46
46
 
47
- it "should increment by 1 by default" do
47
+ it "increments by 1 by default" do
48
48
  @increment_expectation[1]
49
49
  @ctr.increment
50
50
  end
51
51
 
52
- it "should support incrementing by positive numbers" do
52
+ it "increments by positive numbers" do
53
53
  @increment_expectation[15]
54
54
  @ctr.increment 15
55
55
  end
56
56
 
57
- it "should support incrementing by negative numbers" do
57
+ it "increments by negative numbers" do
58
58
  @increment_expectation[-12]
59
59
  @ctr.increment -12
60
60
  end
61
61
 
62
- it "should decrement by 1 by default" do
62
+ it "decrements by 1 by default" do
63
63
  @increment_expectation[-1]
64
64
  @ctr.decrement
65
65
  end
66
66
 
67
- it "should support decrementing by positive numbers" do
67
+ it "decrements by positive numbers" do
68
68
  @increment_expectation[-30]
69
69
  @ctr.decrement 30
70
70
  end
71
71
 
72
- it "should support decrementing by negative numbers" do
72
+ it "decrements by negative numbers" do
73
73
  @increment_expectation[41]
74
74
  @ctr.decrement -41
75
75
  end
76
76
 
77
- it "should forbid incrementing by non-integers" do
77
+ it "forbids incrementing by non-integers" do
78
78
  [1.1, nil, :'1', '1', 2.0/2, [1]].each do |candidate|
79
79
  expect do
80
80
  @ctr.increment candidate
@@ -109,12 +109,12 @@ describe Riak::Counter do
109
109
  @ctr = Riak::Counter.new @bucket, @key
110
110
  end
111
111
 
112
- it "should not retry on timeout" do
112
+ it "doesn't retry on timeout" do
113
113
  @expect_post.once.and_raise('timeout')
114
114
  expect(proc { @ctr.increment }).to raise_error
115
115
  end
116
116
 
117
- it "should not retry on quorum failure" do
117
+ it "doesn't retry on quorum failure" do
118
118
  @expect_post.once.and_raise('quorum not satisfied')
119
119
  expect(proc { @ctr.increment }).to raise_error
120
120
  end
@@ -8,7 +8,7 @@ describe Riak::Crdt::Counter do
8
8
  allow(b).to receive(:is_a?).and_return(true)
9
9
  end
10
10
  end
11
- it 'should be initialized with bucket, key, and optional bucket-type' do
11
+ it 'initializes with bucket, key, and optional bucket-type' do
12
12
  expect{ described_class.new bucket, 'key' }.to_not raise_error
13
13
  expect{ described_class.new bucket, 'key', 'type' }.to_not raise_error
14
14
  end
@@ -18,6 +18,7 @@ describe Riak::Crdt::Counter do
18
18
  describe 'with a client' do
19
19
  let(:response){ double 'response', key: nil }
20
20
  let(:operator){ double 'operator' }
21
+ let(:loader){ double 'loader', get_loader_for_value: nil }
21
22
  let(:backend){ double 'backend' }
22
23
  let(:client){ double 'client' }
23
24
 
@@ -25,11 +26,12 @@ describe Riak::Crdt::Counter do
25
26
  allow(bucket).to receive(:client).and_return(client)
26
27
  allow(client).to receive(:backend).and_yield(backend)
27
28
  allow(backend).to receive(:crdt_operator).and_return(operator)
29
+ allow(backend).to receive(:crdt_loader).and_return(loader)
28
30
  end
29
31
 
30
32
  include_examples 'Counter CRDT'
31
33
 
32
- it 'should batch properly' do
34
+ it 'batches properly' do
33
35
  expect(operator).
34
36
  to receive(:operate) { |bucket, key, type, operations|
35
37
  expect(bucket).to eq bucket
@@ -12,7 +12,7 @@ describe Riak::Crdt::InnerCounter do
12
12
 
13
13
  include_examples 'Counter CRDT'
14
14
 
15
- it 'should send increments to the parent' do
15
+ it 'sends increments to the parent' do
16
16
  expect(parent).to receive(:increment).
17
17
  with(counter_name, 1)
18
18
 
@@ -5,7 +5,7 @@ describe Riak::Crdt::InnerFlag do
5
5
  describe 'a truthy flag' do
6
6
  subject { described_class.new parent, true }
7
7
 
8
- it 'should feel truthy' do
8
+ it 'feels truthy' do
9
9
  expect(subject).to be
10
10
  end
11
11
  end
@@ -13,7 +13,7 @@ describe Riak::Crdt::InnerFlag do
13
13
  describe 'a falsey flag' do
14
14
  subject { described_class.new parent, false }
15
15
 
16
- it 'should feel falsey' do
16
+ it 'feels falsey' do
17
17
  expect(subject).to_not be
18
18
  end
19
19
  end
@@ -21,7 +21,7 @@ describe Riak::Crdt::InnerFlag do
21
21
  describe 'updating' do
22
22
  let(:new_value){ false }
23
23
 
24
- it 'should ask the class for an update operation' do
24
+ it '\asks the class for an update operation' do
25
25
  operation = described_class.update(new_value)
26
26
 
27
27
  expect(operation.value).to eq new_value
@@ -30,7 +30,7 @@ describe Riak::Crdt::InnerFlag do
30
30
  end
31
31
 
32
32
  describe 'deleting' do
33
- it 'should ask the class for a delete operation' do
33
+ it 'asks the class for a delete operation' do
34
34
  operation = described_class.delete
35
35
 
36
36
  expect(operation.type).to eq :flag
@@ -17,13 +17,13 @@ describe Riak::Crdt::InnerMap do
17
17
  }
18
18
  end
19
19
 
20
- it 'should be initializable with a nested hash of maps' do
20
+ it 'is initializable with a nested hash of maps' do
21
21
  expect{described_class.new parent, populated_contents}.
22
22
  to_not raise_error
23
23
  end
24
24
 
25
25
  describe 'deleting the inner map' do
26
- it 'should ask the class for a delete operation' do
26
+ it 'asks the class for a delete operation' do
27
27
  operation = described_class.delete
28
28
 
29
29
  expect(operation.type).to eq :map
@@ -32,7 +32,7 @@ describe Riak::Crdt::InnerMap do
32
32
 
33
33
  describe 'receiving an operation' do
34
34
  let(:inner_operation){ double 'inner operation' }
35
- it 'should wrap the operation in an update operation and pass it to the parent' do
35
+ it 'wraps the operation in an update operation and pass it to the parent' do
36
36
  subject.name = 'name'
37
37
 
38
38
  expect(parent).to receive(:operate) do |name, op|
@@ -4,17 +4,17 @@ describe Riak::Crdt::InnerRegister do
4
4
  let(:parent){ double 'parent' }
5
5
  subject { described_class.new parent, "espressos" }
6
6
 
7
- it 'should feel like a string' do
7
+ it 'feels like a string' do
8
8
  expect(subject).to match 'espressos'
9
9
  expect{ subject.gsub('s', 'x') }.to_not raise_error
10
10
  expect(subject.gsub('s', 'x')).to eq 'exprexxox'
11
11
  end
12
12
 
13
13
  describe 'immutability' do
14
- it 'should be frozen' do
14
+ it 'is frozen' do
15
15
  expect(subject.frozen?).to be
16
16
  end
17
- it "shouldn't be gsub!-able" do
17
+ it "isn't be gsub!-able" do
18
18
  # "gsub!-able" is awful, open to suggestions
19
19
  expect{ subject.gsub!('s', 'x') }.to raise_error
20
20
  end
@@ -22,7 +22,7 @@ describe Riak::Crdt::InnerRegister do
22
22
 
23
23
  describe 'updating' do
24
24
  let(:new_value){ 'new value' }
25
- it "should ask the class for an update operation" do
25
+ it "asks the class for an update operation" do
26
26
  operation = described_class.update(new_value)
27
27
 
28
28
  expect(operation.value).to eq new_value
@@ -31,7 +31,7 @@ describe Riak::Crdt::InnerRegister do
31
31
  end
32
32
 
33
33
  describe 'deleting' do
34
- it 'should ask the class for a delete operation' do
34
+ it 'asks the class for a delete operation' do
35
35
  operation = described_class.delete
36
36
 
37
37
  expect(operation.type).to eq :register
@@ -12,7 +12,7 @@ describe Riak::Crdt::InnerSet do
12
12
 
13
13
  include_examples 'Set CRDT'
14
14
 
15
- it 'should send additions to the parent' do
15
+ it 'sends additions to the parent' do
16
16
  expect(parent).to receive(:operate) do |name, op|
17
17
  expect(name).to eq set_name
18
18
  expect(op.type).to eq :set
@@ -28,7 +28,7 @@ describe Riak::Crdt::Map do
28
28
  include_examples 'Map CRDT'
29
29
 
30
30
  describe 'batch mode' do
31
- it 'should queue up operations' do
31
+ it 'queues up operations' do
32
32
  expect(operator).
33
33
  to receive(:operate) do |bucket, key_arg, type, operations|
34
34
 
@@ -51,7 +51,7 @@ describe Riak::Crdt::Map do
51
51
  end
52
52
 
53
53
  describe 'immediate mode' do
54
- it 'should submit member operations immediately' do
54
+ it 'submits member operations immediately' do
55
55
  expect(operator).
56
56
  to receive(:operate) do |bucket, key_arg, type, operations|
57
57
 
@@ -9,7 +9,7 @@ describe Riak::Crdt::Set do
9
9
  end
10
10
  end
11
11
 
12
- it 'should be initialized with bucket, key, and optional bucket-type' do
12
+ it 'initializes with bucket, key, and optional bucket-type' do
13
13
  expect{described_class.new bucket, 'key', 'optional bucket type'}.
14
14
  to_not raise_error
15
15
  end
@@ -19,6 +19,7 @@ describe Riak::Crdt::Set do
19
19
  describe 'with a client' do
20
20
  let(:response){ double 'response', key: nil }
21
21
  let(:operator){ double 'operator' }
22
+ let(:loader){ double 'loader', get_loader_for_value: nil }
22
23
  let(:backend){ double 'backend' }
23
24
  let(:client){ double 'client' }
24
25
 
@@ -26,11 +27,12 @@ describe Riak::Crdt::Set do
26
27
  allow(bucket).to receive(:client).and_return(client)
27
28
  allow(client).to receive(:backend).and_yield(backend)
28
29
  allow(backend).to receive(:crdt_operator).and_return(operator)
30
+ allow(backend).to receive(:crdt_loader).and_return(loader)
29
31
  end
30
32
 
31
33
  include_examples 'Set CRDT'
32
34
 
33
- it 'should batch properly' do
35
+ it 'batches properly' do
34
36
  expect(operator).
35
37
  to receive(:operate) { |bucket, key, type, operations|
36
38
 
@@ -1,74 +1,74 @@
1
1
  shared_examples_for "Map CRDT" do
2
2
  let(:typed_collection){ Riak::Crdt::TypedCollection }
3
3
 
4
- it 'should contain counters' do
4
+ it 'contains counters' do
5
5
  expect(subject).to respond_to(:counters)
6
6
  expect(subject.counters).to be_an_instance_of typed_collection
7
7
  end
8
8
 
9
- it 'should contain flags' do
9
+ it 'contains flags' do
10
10
  expect(subject).to respond_to(:flags)
11
11
  expect(subject.counters).to be_an_instance_of typed_collection
12
12
  end
13
13
 
14
- it 'should contain maps' do
14
+ it 'contains maps' do
15
15
  expect(subject).to respond_to(:maps)
16
16
  expect(subject.counters).to be_an_instance_of typed_collection
17
17
  end
18
18
 
19
- it 'should contain registers' do
19
+ it 'contains registers' do
20
20
  expect(subject).to respond_to(:registers)
21
21
  expect(subject.counters).to be_an_instance_of typed_collection
22
22
  end
23
23
 
24
- it 'should contain sets' do
24
+ it 'contains sets' do
25
25
  expect(subject).to respond_to(:sets)
26
26
  expect(subject.counters).to be_an_instance_of typed_collection
27
27
  end
28
28
 
29
- it 'should accept operations' do
29
+ it 'accepts operations' do
30
30
  expect(subject).to respond_to(:operate)
31
31
  end
32
32
  end
33
33
 
34
34
  shared_examples_for "Counter CRDT" do
35
- it 'should have a value' do
35
+ it 'has a value' do
36
36
  expect(subject).to respond_to :value
37
37
  end
38
38
 
39
- it 'should have an increment method' do
39
+ it 'has an increment method' do
40
40
  expect(subject).to respond_to :increment
41
41
  end
42
42
 
43
- it 'should have a decrement method' do
43
+ it 'has a decrement method' do
44
44
  expect(subject).to respond_to :decrement
45
45
  end
46
46
 
47
- it 'should have a batch method' do
47
+ it 'has a batch method' do
48
48
  expect(subject).to respond_to :batch
49
49
  end
50
50
  end
51
51
 
52
52
  shared_examples_for 'Set CRDT' do
53
- it 'should have a value' do
53
+ it 'has a value' do
54
54
  expect(subject).to respond_to :value
55
55
  expect(subject).to respond_to :members
56
56
  expect(subject).to respond_to :to_a
57
57
  end
58
58
 
59
- it 'should have an include? method' do
59
+ it 'has an include? method' do
60
60
  expect(subject).to respond_to :include?
61
61
  end
62
62
 
63
- it 'should have an empty? method' do
63
+ it 'has an empty? method' do
64
64
  expect(subject).to respond_to :empty?
65
65
  end
66
66
 
67
- it 'should have an add method' do
67
+ it 'has an add method' do
68
68
  expect(subject).to respond_to :add
69
69
  end
70
70
 
71
- it 'should have a remove method' do
71
+ it 'has a remove method' do
72
72
  expect(subject).to respond_to :remove
73
73
  end
74
74
  end
@@ -5,7 +5,7 @@ describe Riak::Crdt::TypedCollection do
5
5
  let(:operation){ double 'operation' }
6
6
 
7
7
  describe 'initialization' do
8
- it "should accept a type, parent, and hash of values" do
8
+ it "accepts a type, parent, and hash of values" do
9
9
  expect{ described_class.new Riak::Crdt::Counter, parent, {} }.to_not raise_error
10
10
  end
11
11
  end
@@ -17,7 +17,7 @@ describe Riak::Crdt::TypedCollection do
17
17
  described_class.new register_class, parent, existing: 'existing'
18
18
  end
19
19
 
20
- it 'should expose them as frozen strings that are really Registers' do
20
+ it 'exposes them as frozen strings that are really Registers' do
21
21
  expect(subject[:existing]).to eq 'existing'
22
22
  expect(subject['existing']).to eq 'existing'
23
23
  expect(subject[:existing]).to be_an_instance_of register_class
@@ -29,10 +29,7 @@ describe Riak::Crdt::TypedCollection do
29
29
 
30
30
  let(:new_value){ 'the new value' }
31
31
 
32
- it <<-EOD.gsub(/\s+/, ' ') do
33
- should ask the register class for an operation with the new value,
34
- add a name to it, and pass it up to the parent
35
- EOD
32
+ it 'asks the register class for an operation' do
36
33
  expect(register_class).to receive(:update).
37
34
  with(new_value).
38
35
  and_return(operation)
@@ -51,10 +48,7 @@ describe Riak::Crdt::TypedCollection do
51
48
 
52
49
  describe 'removing' do
53
50
 
54
- it <<-EOD.gsub(/\s+/, ' ') do
55
- should ask the register class for a remove operation, add a name to
56
- it, and pass it up to the parent
57
- EOD
51
+ it 'asks the register class for a remove operation' do
58
52
  expect(register_class).
59
53
  to receive(:delete).
60
54
  and_return(operation)
@@ -77,12 +71,12 @@ describe Riak::Crdt::TypedCollection do
77
71
  described_class.new flag_class, parent, truthy: true, falsey: false
78
72
  end
79
73
 
80
- it 'should expose them as booleans' do
74
+ it 'exposes them as booleans' do
81
75
  expect(subject[:truthy]).to eq true
82
76
  expect(subject['falsey']).to eq false
83
77
  end
84
78
 
85
- it 'should update them' do
79
+ it 'updates them' do
86
80
  expect(flag_class).
87
81
  to receive(:update).
88
82
  with(true).
@@ -99,7 +93,7 @@ describe Riak::Crdt::TypedCollection do
99
93
  subject['become_truthy'] = true
100
94
  end
101
95
 
102
- it 'should delete them' do
96
+ it 'deletes them' do
103
97
  expect(flag_class).
104
98
  to receive(:delete).
105
99
  and_return(operation)
@@ -120,19 +114,19 @@ describe Riak::Crdt::TypedCollection do
120
114
 
121
115
  subject{ described_class.new counter_class, parent, zero: 0, one: 1 }
122
116
 
123
- it 'should expose existing ones as Counter instances' do
117
+ it 'exposes existing ones as Counter instances' do
124
118
  expect(subject['zero']).to be_an_instance_of counter_class
125
119
  expect(subject['zero'].to_i).to eq 0
126
120
 
127
121
  expect(subject['one'].to_i).to eq 1
128
122
  end
129
123
 
130
- it 'should expose new ones as Counter instances' do
124
+ it 'exposes new ones as Counter instances' do
131
125
  expect(subject['new_zero']).to be_an_instance_of counter_class
132
126
  expect(subject['new_zero'].to_i).to eq 0
133
127
  end
134
128
 
135
- it 'should allow incrementing and decrementing' do
129
+ it 'allows incrementing and decrementing' do
136
130
  counter_name = 'counter'
137
131
 
138
132
  expect(parent).to receive(:operate) do |op|
@@ -156,17 +150,17 @@ describe Riak::Crdt::TypedCollection do
156
150
 
157
151
  subject{ described_class.new set_class, parent, brewers: %w{aeropress clever v60}}
158
152
 
159
- it 'should expose existing ones as Set instances' do
153
+ it 'exposes existing ones as Set instances' do
160
154
  expect(subject['brewers']).to be_an_instance_of set_class
161
155
  expect(subject['brewers']).to include 'aeropress'
162
156
  end
163
157
 
164
- it 'should expose new ones as empty Set instances' do
158
+ it 'exposes new ones as empty Set instances' do
165
159
  expect(subject['filters']).to be_an_instance_of set_class
166
160
  expect(subject['filters']).to be_empty
167
161
  end
168
162
 
169
- it 'should allow adding and removing' do
163
+ it 'allows adding and removing' do
170
164
  set_name = 'brewers'
171
165
 
172
166
  expect(parent).to receive(:operate) do |op|
@@ -205,17 +199,17 @@ describe Riak::Crdt::TypedCollection do
205
199
  described_class.new map_class, parent, contents
206
200
  end
207
201
 
208
- it 'should expose existing ones as populated Map instances' do
202
+ it 'exposes existing ones as populated Map instances' do
209
203
  expect(subject['a']).to be_an_instance_of map_class
210
204
  expect(subject['a'].registers['hello']).to eq 'world'
211
205
  end
212
206
 
213
- it 'should expose new ones as empty Map instances' do
207
+ it 'exposes new ones as empty Map instances' do
214
208
  expect(subject['b']).to be_an_instance_of map_class
215
209
  expect(subject['b'].registers['hello']).to be_nil
216
210
  end
217
211
 
218
- it 'should cascade operations to a parent map' do
212
+ it 'cascades operations to a parent map' do
219
213
  expect(operation).
220
214
  to receive(:name=).
221
215
  with(inner_map_name)