Skip to content

Commit

Permalink
Remove unused @attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinlaking committed Sep 27, 2015
1 parent 58aa8aa commit 788258c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 1 addition & 3 deletions lib/vedeu/models/group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ class Group
# visible or not.
# @return [Vedeu::Models::Group]
def initialize(attributes = {})
@attributes = defaults.merge!(attributes)

@attributes.each do |key, value|
defaults.merge!(attributes).each do |key, value|
instance_variable_set("@#{key}", value)
end
end
Expand Down
3 changes: 0 additions & 3 deletions test/lib/vedeu/models/group_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ module Models

describe '#initialize' do
it { instance.must_be_instance_of(described) }
it {
instance.instance_variable_get('@attributes').must_be_instance_of(Hash)
}
it { instance.instance_variable_get('@members').must_equal(members) }
it { instance.instance_variable_get('@name').must_equal(_name) }
it {
Expand Down

0 comments on commit 788258c

Please sign in to comment.