Skip to content

Commit

Permalink
Rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
coffeencoke committed Nov 6, 2012
1 parent dccfb47 commit 8958cba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/mince_dynamo_db/interface.rb
Expand Up @@ -8,7 +8,7 @@ module MinceDynamoDb # :nodoc:
module Interface
# Not yet implemented
def self.update_field_with_value(collection_name, primary_key_value, field_name, new_value)
item = find(collection_name, primary_key_identifier, primary_key_value)
item = find(collection_name, primary_key, primary_key_value)
item.set(field_name => new_value)
end

Expand Down Expand Up @@ -36,7 +36,7 @@ def self.collection_status(collection_name)
# primary key.
#
# @return [String] the name of the primary key field.
def self.primary_key_identifier
def self.primary_key
Config.primary_key
end

Expand Down
4 changes: 2 additions & 2 deletions spec/units/interface_spec.rb
Expand Up @@ -35,7 +35,7 @@
primary_key_value = mock("id of record")
field_name = mock 'field name'
new_value = mock 'new value'
items.stub(:where).with(described_class.primary_key_identifier.to_s => primary_key_value).and_return([return_data])
items.stub(:where).with(described_class.primary_key.to_s => primary_key_value).and_return([return_data])

attributes.should_receive(:set).with(field_name => new_value)

Expand All @@ -47,7 +47,7 @@
primary_key_value = mock("id of record")
field_name = mock 'field name'
new_value = mock 'new value'
items.stub(:where).with(described_class.primary_key_identifier.to_s => primary_key_value).and_return([return_data])
items.stub(:where).with(described_class.primary_key.to_s => primary_key_value).and_return([return_data])

attributes.should_receive(:set).with(field_name => new_value)

Expand Down

0 comments on commit 8958cba

Please sign in to comment.