rest-in-peace 1.3.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.1
1
+ 1.4.0
data/lib/rest_in_peace.rb CHANGED
@@ -18,6 +18,10 @@ module RESTinPeace
18
18
  Hash[each_pair.to_a]
19
19
  end
20
20
 
21
+ def update_attributes(attributes)
22
+ update_from_hash(attributes)
23
+ end
24
+
21
25
  protected
22
26
 
23
27
  def update_from_hash(hash)
@@ -63,4 +63,12 @@ describe RESTinPeace do
63
63
  end
64
64
  end
65
65
 
66
+ describe '#update_attributes' do
67
+ let(:new_attributes) { { name: 'yoloswag' } }
68
+ subject { instance }
69
+ specify do
70
+ expect { subject.update_attributes(new_attributes) }.
71
+ to change(instance, :name).from(attributes[:name]).to(new_attributes[:name])
72
+ end
73
+ end
66
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest-in-peace
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-23 00:00:00.000000000 Z
12
+ date: 2014-07-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake