cequel 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cequel.rb +1 -0
  3. data/lib/cequel/errors.rb +1 -0
  4. data/lib/cequel/metal.rb +1 -0
  5. data/lib/cequel/metal/batch.rb +1 -0
  6. data/lib/cequel/metal/batch_manager.rb +1 -0
  7. data/lib/cequel/metal/cql_row_specification.rb +1 -0
  8. data/lib/cequel/metal/data_set.rb +1 -0
  9. data/lib/cequel/metal/deleter.rb +1 -0
  10. data/lib/cequel/metal/incrementer.rb +1 -0
  11. data/lib/cequel/metal/inserter.rb +1 -0
  12. data/lib/cequel/metal/keyspace.rb +1 -0
  13. data/lib/cequel/metal/logger.rb +1 -0
  14. data/lib/cequel/metal/logging.rb +1 -0
  15. data/lib/cequel/metal/new_relic_instrumentation.rb +1 -0
  16. data/lib/cequel/metal/row.rb +1 -0
  17. data/lib/cequel/metal/row_specification.rb +1 -0
  18. data/lib/cequel/metal/statement.rb +1 -0
  19. data/lib/cequel/metal/updater.rb +1 -0
  20. data/lib/cequel/metal/writer.rb +1 -0
  21. data/lib/cequel/record.rb +1 -0
  22. data/lib/cequel/record/association_collection.rb +1 -0
  23. data/lib/cequel/record/associations.rb +1 -0
  24. data/lib/cequel/record/belongs_to_association.rb +1 -0
  25. data/lib/cequel/record/bound.rb +1 -0
  26. data/lib/cequel/record/bulk_writes.rb +1 -0
  27. data/lib/cequel/record/callbacks.rb +1 -0
  28. data/lib/cequel/record/collection.rb +1 -0
  29. data/lib/cequel/record/configuration_generator.rb +1 -0
  30. data/lib/cequel/record/conversion.rb +1 -0
  31. data/lib/cequel/record/data_set_builder.rb +1 -0
  32. data/lib/cequel/record/dirty.rb +1 -0
  33. data/lib/cequel/record/errors.rb +1 -0
  34. data/lib/cequel/record/has_many_association.rb +1 -0
  35. data/lib/cequel/record/lazy_record_collection.rb +1 -0
  36. data/lib/cequel/record/mass_assignment.rb +1 -0
  37. data/lib/cequel/record/persistence.rb +1 -0
  38. data/lib/cequel/record/properties.rb +1 -0
  39. data/lib/cequel/record/railtie.rb +1 -0
  40. data/lib/cequel/record/record_generator.rb +1 -0
  41. data/lib/cequel/record/record_set.rb +1 -0
  42. data/lib/cequel/record/schema.rb +1 -0
  43. data/lib/cequel/record/scoped.rb +1 -0
  44. data/lib/cequel/record/secondary_indexes.rb +1 -0
  45. data/lib/cequel/record/tasks.rb +1 -0
  46. data/lib/cequel/record/validations.rb +1 -0
  47. data/lib/cequel/schema.rb +1 -0
  48. data/lib/cequel/schema/column.rb +1 -0
  49. data/lib/cequel/schema/create_table_dsl.rb +1 -0
  50. data/lib/cequel/schema/keyspace.rb +1 -0
  51. data/lib/cequel/schema/migration_validator.rb +1 -0
  52. data/lib/cequel/schema/table.rb +1 -0
  53. data/lib/cequel/schema/table_property.rb +1 -0
  54. data/lib/cequel/schema/table_reader.rb +1 -0
  55. data/lib/cequel/schema/table_synchronizer.rb +1 -0
  56. data/lib/cequel/schema/table_updater.rb +1 -0
  57. data/lib/cequel/schema/table_writer.rb +1 -0
  58. data/lib/cequel/schema/update_table_dsl.rb +1 -0
  59. data/lib/cequel/type.rb +3 -2
  60. data/lib/cequel/util.rb +1 -0
  61. data/lib/cequel/version.rb +2 -1
  62. data/spec/environment.rb +3 -2
  63. data/spec/examples/metal/data_set_spec.rb +1 -0
  64. data/spec/examples/record/associations_spec.rb +1 -0
  65. data/spec/examples/record/callbacks_spec.rb +1 -0
  66. data/spec/examples/record/dirty_spec.rb +1 -0
  67. data/spec/examples/record/list_spec.rb +28 -27
  68. data/spec/examples/record/map_spec.rb +29 -28
  69. data/spec/examples/record/mass_assignment_spec.rb +1 -0
  70. data/spec/examples/record/naming_spec.rb +1 -0
  71. data/spec/examples/record/persistence_spec.rb +1 -0
  72. data/spec/examples/record/properties_spec.rb +24 -23
  73. data/spec/examples/record/record_set_spec.rb +1 -0
  74. data/spec/examples/record/schema_spec.rb +1 -0
  75. data/spec/examples/record/scoped_spec.rb +1 -0
  76. data/spec/examples/record/secondary_index_spec.rb +1 -0
  77. data/spec/examples/record/serialization_spec.rb +1 -0
  78. data/spec/examples/record/set_spec.rb +12 -11
  79. data/spec/examples/record/spec_helper.rb +1 -0
  80. data/spec/examples/record/validations_spec.rb +1 -0
  81. data/spec/examples/schema/table_reader_spec.rb +1 -0
  82. data/spec/examples/schema/table_synchronizer_spec.rb +1 -0
  83. data/spec/examples/schema/table_updater_spec.rb +1 -0
  84. data/spec/examples/schema/table_writer_spec.rb +1 -0
  85. data/spec/examples/spec_helper.rb +1 -0
  86. data/spec/examples/type_spec.rb +1 -0
  87. data/spec/shared/readable_dictionary.rb +1 -0
  88. data/spec/support/helpers.rb +1 -0
  89. data/spec/support/result_stub.rb +1 -0
  90. data/templates/record.rb +1 -0
  91. metadata +42 -28
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cbbbc8b19ddcc607473f72539c53fb5aaf00aa7e
4
- data.tar.gz: b417bdbf6d4308074b1c83cc348cd8370913252e
3
+ metadata.gz: b8fa70fd005e6853b4352c88da285f64f877442d
4
+ data.tar.gz: 619ef21e2ce06aeae7353d083e51c5b2a60f98cd
5
5
  SHA512:
6
- metadata.gz: b7259fcb8ca0ce0ef51d8417b1060726c6de8579041a066dfaf676a43902bfe3d652e086eaf62552627f47579bef4314df04770a165cfd8af6ba4a43be64c277
7
- data.tar.gz: f397e3c887fe4bfcecd4de9666b3b53885576a3cc192cdd3a6fb14ae3f432b55026bfd665ebb7f99f37034f6a255dfee39dcd8e764309e20d543b7cb57fd0034
6
+ metadata.gz: 8992a767740b4fd03a2b6ea32d3431a7595cd43115d5173003de4608095ff5ceba7ef3db6d74ddc5294c68f8fb5052b19e9496da5f299b8d861d971d6287b856
7
+ data.tar.gz: abc8506ec213817ff386646dd96a6e7fd487028e65c397a7c3b5784eb57950b7e374c59dd234d0dab02654f925371bca30ab2cdb531503a370b856aed7e3c022
data/lib/cequel.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'delegate'
2
3
 
3
4
  require 'active_support/core_ext'
data/lib/cequel/errors.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  #
3
4
  # @since 1.0.0
data/lib/cequel/metal.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'cequel/metal/batch'
2
3
  require 'cequel/metal/batch_manager'
3
4
  require 'cequel/metal/cql_row_specification'
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'stringio'
2
3
 
3
4
  module Cequel
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Metal
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Metal
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'forwardable'
2
3
 
3
4
  module Cequel
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Metal
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Metal
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Metal
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Metal
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Metal
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Metal
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  begin
2
3
  require 'new_relic/agent/method_tracer'
3
4
  rescue LoadError => e
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Metal
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Metal
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Metal
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Metal
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Metal
3
4
  #
data/lib/cequel/record.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'active_model'
2
3
 
3
4
  require 'cequel'
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'delegate'
2
3
 
3
4
  module Cequel
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  begin
2
3
  require 'active_model/forbidden_attributes_protection'
3
4
  rescue LoadError
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  # @private
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  namespace :cequel do
2
3
  namespace :keyspace do
3
4
  desc 'Initialize Cassandra keyspace'
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Record
3
4
  #
data/lib/cequel/schema.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'cequel/schema/column'
2
3
  require 'cequel/schema/create_table_dsl'
3
4
  require 'cequel/schema/keyspace'
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Schema
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Schema
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Schema
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Schema
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'stringio'
2
3
 
3
4
  module Cequel
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Schema
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Schema
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Schema
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Schema
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Schema
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Schema
3
4
  #
data/lib/cequel/type.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'singleton'
2
3
 
3
4
  module Cequel
@@ -413,8 +414,8 @@ module Cequel
413
414
  # CQL3 data type documentation
414
415
  #
415
416
  class Varint < Int
416
- def internal_name
417
- 'org.apache.cassandra.db.marshal.IntegerType'
417
+ def internal_names
418
+ ['org.apache.cassandra.db.marshal.IntegerType']
418
419
  end
419
420
  end
420
421
  register Varint.instance
data/lib/cequel/util.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  module Util
3
4
  #
@@ -1,4 +1,5 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cequel
2
3
  # The current version of the library
3
- VERSION = '1.0.1'
4
+ VERSION = '1.0.2'
4
5
  end
data/spec/environment.rb CHANGED
@@ -1,7 +1,8 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'bundler'
2
3
 
3
4
  if ENV['CI']
4
- Bundler.require(:default, :test)
5
+ Bundler.require(:default, :development)
5
6
  else
6
- Bundler.require(:default, :test, :debug)
7
+ Bundler.require(:default, :development, :debug)
7
8
  end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require File.expand_path('../../spec_helper', __FILE__)
2
3
 
3
4
  describe Cequel::Metal::DataSet do
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require_relative 'spec_helper'
2
3
 
3
4
  describe Cequel::Record::Associations do
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require File.expand_path('../spec_helper', __FILE__)
2
3
 
3
4
  describe Cequel::Record::Callbacks do
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require File.expand_path('../spec_helper', __FILE__)
2
3
 
3
4
  describe Cequel::Record::Dirty do
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require File.expand_path('../spec_helper', __FILE__)
2
3
 
3
4
  describe Cequel::Record::List do
@@ -66,12 +67,12 @@ describe Cequel::Record::List do
66
67
 
67
68
  it 'should add new items in memory when loaded' do
68
69
  unloaded_post.tags << 'four' << 'five'
69
- unloaded_post.tags.should == %w(one two four five)
70
+ expect(unloaded_post.tags).to eq(%w(one two four five))
70
71
  end
71
72
 
72
73
  it 'should cast to defined value' do
73
74
  post.contributor_ids << '3' << 4.0
74
- post.contributor_ids.should == [1, 2, 3, 4]
75
+ expect(post.contributor_ids).to eq([1, 2, 3, 4])
75
76
  end
76
77
  end
77
78
 
@@ -82,12 +83,12 @@ describe Cequel::Record::List do
82
83
  post.tags[1] = 'TWO'
83
84
  post.save
84
85
  subject[:tags].should == %w(one TWO three)
85
- post.tags.should == %w(one TWO)
86
+ expect(post.tags).to eq(%w(one TWO))
86
87
  end
87
88
 
88
89
  it 'should cast element before replacing' do
89
90
  post.contributor_ids[1] = '5'
90
- post.contributor_ids.should == [1, 5]
91
+ expect(post.contributor_ids).to eq([1, 5])
91
92
  end
92
93
 
93
94
  it 'should replace an element without reading' do
@@ -103,19 +104,19 @@ describe Cequel::Record::List do
103
104
 
104
105
  it 'should apply local modifications when loaded later' do
105
106
  unloaded_post.tags[1] = 'TWO'
106
- unloaded_post.tags.should == %w(one TWO three)
107
+ expect(unloaded_post.tags).to eq(%w(one TWO three))
107
108
  end
108
109
 
109
110
  it 'should atomically replace a given number of arguments' do
110
111
  post.tags[0, 2] = 'One', 'Two'
111
112
  post.save
112
113
  subject[:tags].should == %w(One Two three)
113
- post.tags.should == %w(One Two)
114
+ expect(post.tags).to eq(%w(One Two))
114
115
  end
115
116
 
116
117
  it 'should cast multiple elements before replacing them' do
117
118
  post.contributor_ids[0, 2] = %w(4 5)
118
- post.contributor_ids.should == [4, 5]
119
+ expect(post.contributor_ids).to eq([4, 5])
119
120
  end
120
121
 
121
122
  it 'should remove elements beyond positional arguments' do
@@ -123,14 +124,14 @@ describe Cequel::Record::List do
123
124
  post.tags[0, 3] = 'ONE'
124
125
  post.save
125
126
  subject[:tags].should == %w(ONE four)
126
- post.tags.should == %w(ONE)
127
+ expect(post.tags).to eq(%w(ONE))
127
128
  end
128
129
 
129
130
  it 'should atomically replace a given range of elements' do
130
131
  post.tags[0..1] = ['One', 'Two']
131
132
  post.save
132
133
  subject[:tags].should == %w(One Two three)
133
- post.tags.should == %w(One Two)
134
+ expect(post.tags).to eq(%w(One Two))
134
135
  end
135
136
 
136
137
  it 'should remove elements beyond positional arguments' do
@@ -138,7 +139,7 @@ describe Cequel::Record::List do
138
139
  post.tags[0..2] = 'ONE'
139
140
  post.save
140
141
  subject[:tags].should == %w(ONE four)
141
- post.tags.should == %w(ONE)
142
+ expect(post.tags).to eq(%w(ONE))
142
143
  end
143
144
  end
144
145
 
@@ -147,7 +148,7 @@ describe Cequel::Record::List do
147
148
  post.tags.clear
148
149
  post.save
149
150
  subject[:tags].should be_blank
150
- post.tags.should == []
151
+ expect(post.tags).to eq([])
151
152
  end
152
153
 
153
154
  it 'should clear elements without loading' do
@@ -163,7 +164,7 @@ describe Cequel::Record::List do
163
164
 
164
165
  it 'should apply local modifications post-hoc' do
165
166
  unloaded_post.tags.clear
166
- unloaded_post.tags.should == []
167
+ expect(unloaded_post.tags).to eq([])
167
168
  end
168
169
  end
169
170
 
@@ -179,12 +180,12 @@ describe Cequel::Record::List do
179
180
  post.tags.concat(['four', 'five'])
180
181
  post.save
181
182
  subject[:tags].should == %w(one two three four five)
182
- post.tags.should == %w(one two four five)
183
+ expect(post.tags).to eq(%w(one two four five))
183
184
  end
184
185
 
185
186
  it 'should cast elements before concatentating' do
186
187
  post.contributor_ids.concat(%w(3 4))
187
- post.contributor_ids.should == [1, 2, 3, 4]
188
+ expect(post.contributor_ids).to eq([1, 2, 3, 4])
188
189
  end
189
190
 
190
191
  it 'should concat elements without loading' do
@@ -200,7 +201,7 @@ describe Cequel::Record::List do
200
201
 
201
202
  it 'should apply local modifications when loaded later' do
202
203
  unloaded_post.tags.concat(['four', 'five'])
203
- unloaded_post.tags.should == %w(one two four five)
204
+ expect(unloaded_post.tags).to eq(%w(one two four five))
204
205
  end
205
206
  end
206
207
 
@@ -211,12 +212,12 @@ describe Cequel::Record::List do
211
212
  post.tags.delete('two')
212
213
  post.save
213
214
  subject[:tags].should == %w(one three)
214
- post.tags.should == %w(one)
215
+ expect(post.tags).to eq(%w(one))
215
216
  end
216
217
 
217
218
  it 'should cast argument' do
218
219
  post.contributor_ids.delete('2')
219
- post.contributor_ids.should == [1]
220
+ expect(post.contributor_ids).to eq([1])
220
221
  end
221
222
 
222
223
  it 'should delete without loading' do
@@ -232,7 +233,7 @@ describe Cequel::Record::List do
232
233
 
233
234
  it 'should modify local copy after the fact' do
234
235
  unloaded_post.tags.delete('two')
235
- unloaded_post.tags.should == %w(one)
236
+ expect(unloaded_post.tags).to eq(%w(one))
236
237
  end
237
238
  end
238
239
 
@@ -242,7 +243,7 @@ describe Cequel::Record::List do
242
243
  post.tags.delete_at(1)
243
244
  post.save
244
245
  subject[:tags].should == %w(one three four)
245
- post.tags.should == %w(one)
246
+ expect(post.tags).to eq(%w(one))
246
247
  end
247
248
 
248
249
  it 'should delete from a given index without reading' do
@@ -258,7 +259,7 @@ describe Cequel::Record::List do
258
259
 
259
260
  it 'should apply deletion after the fact' do
260
261
  unloaded_post.tags.delete_at(1)
261
- unloaded_post.tags.should == %w(one)
262
+ expect(unloaded_post.tags).to eq(%w(one))
262
263
  end
263
264
  end
264
265
 
@@ -313,7 +314,7 @@ describe Cequel::Record::List do
313
314
  post.tags.push('four').push('five')
314
315
  post.save
315
316
  subject[:tags].should == %w(one two three four five)
316
- post.tags.should == %w(one two four five)
317
+ expect(post.tags).to eq(%w(one two four five))
317
318
  end
318
319
  end
319
320
 
@@ -330,12 +331,12 @@ describe Cequel::Record::List do
330
331
  post.tags.replace(%w(four five))
331
332
  post.save
332
333
  subject[:tags].should == %w(four five)
333
- post.tags.should == %w(four five)
334
+ expect(post.tags).to eq(%w(four five))
334
335
  end
335
336
 
336
337
  it 'should cast before overwriting' do
337
338
  post.contributor_ids.replace(%w(3 4 5))
338
- post.contributor_ids.should == [3, 4, 5]
339
+ expect(post.contributor_ids).to eq([3, 4, 5])
339
340
  end
340
341
 
341
342
  it 'should overwrite without reading' do
@@ -351,7 +352,7 @@ describe Cequel::Record::List do
351
352
 
352
353
  it 'should apply replace post-hoc' do
353
354
  unloaded_post.tags.replace(%w(four five))
354
- unloaded_post.tags.should == %w(four five)
355
+ expect(unloaded_post.tags).to eq(%w(four five))
355
356
  end
356
357
  end
357
358
 
@@ -417,12 +418,12 @@ describe Cequel::Record::List do
417
418
  post.tags.unshift('minustwo', 'minusone')
418
419
  post.save
419
420
  subject[:tags].should == %w(minustwo minusone zero one two)
420
- post.tags.should == %w(minustwo minusone one two)
421
+ expect(post.tags).to eq(%w(minustwo minusone one two))
421
422
  end
422
423
 
423
424
  it 'should cast element before unshifting' do
424
425
  post.contributor_ids.unshift('0')
425
- post.contributor_ids.should == [0, 1, 2]
426
+ expect(post.contributor_ids).to eq([0, 1, 2])
426
427
  end
427
428
 
428
429
  it 'should unshift without reading' do
@@ -438,7 +439,7 @@ describe Cequel::Record::List do
438
439
 
439
440
  it 'should apply unshift after the fact' do
440
441
  unloaded_post.tags.unshift('minustwo', 'minusone')
441
- unloaded_post.tags.should == %w(minustwo minusone one two)
442
+ expect(unloaded_post.tags).to eq(%w(minustwo minusone one two))
442
443
  end
443
444
  end
444
445
  end