archivable 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/archivable/version.rb +1 -1
- data/spec/archivable_controller_spec.rb +4 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ec9af586505369d7a76af5346a905a1d2aefbe8
|
4
|
+
data.tar.gz: 09ff01b04e3bdcf165329b48f63ede75d60be75f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8df916527d0fd026b93b088bb323a57a18a2b9575c16f7159c9ed0799b4f734f9f7ab71d460fb054399bd4660088ab6154e21deda2fb1e91fb0949c18605e615
|
7
|
+
data.tar.gz: 599517b1dfd93606f94dd4261cda96f424def10b548578dceb09d114118d15ce02eebb42d541ba915e4de245d47e24a1d2f2999fc2e5b29822010356f08b46a8
|
data/lib/archivable/version.rb
CHANGED
@@ -12,14 +12,13 @@ describe Archivable::Controller do
|
|
12
12
|
|
13
13
|
it 'should set the instance variable' do
|
14
14
|
subject.archive
|
15
|
-
expect.get_model_instance_variable).to eq(subject.fake)
|
15
|
+
expect(subject.get_model_instance_variable).to eq(subject.fake)
|
16
16
|
end
|
17
17
|
|
18
18
|
context 'when successfully archived' do
|
19
19
|
|
20
20
|
it 'should render the :show action' do
|
21
|
-
|
22
|
-
subject.should_receive(:redirect_to).with(action: :show)
|
21
|
+
expect(subject).to receive(:redirect_to).with(action: :show)
|
23
22
|
subject.archive
|
24
23
|
end
|
25
24
|
end
|
@@ -27,8 +26,8 @@ describe Archivable::Controller do
|
|
27
26
|
context 'when unsuccessfully archived' do
|
28
27
|
|
29
28
|
it 'should render the :show action' do
|
30
|
-
Fake.
|
31
|
-
subject.
|
29
|
+
allow_any_instance_of(Fake).to receive(:save).and_return(false)
|
30
|
+
expect(subject).to receive(:render).with(:edit)
|
32
31
|
subject.archive
|
33
32
|
end
|
34
33
|
end
|