rest_my_case 1.10.2 → 1.10.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rest_my_case/base.rb +0 -4
- data/lib/rest_my_case/context/errors/status.rb +5 -0
- data/lib/rest_my_case/version.rb +1 -1
- data/spec/rest_my_case/status_spec.rb +10 -10
- 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: 28c6ce0aa9e0246531b69a639059a556a76971ea
|
4
|
+
data.tar.gz: 101e9695b6cc2218132ebb08047b5f165d748428
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7c421368fdfb10d6e021b51c661ba5087635cbfe0070cb5d7d46887ad924cd1a11587786b6298d8e6c7ab40ebff8a179c38e719853a59088d320276b1cdaa07
|
7
|
+
data.tar.gz: 48a1ebff33fa391e87933e0a844634064117ad7632f417365b42408feac0a10ce6489ed3b964094aaf750b119e39ed25886e3e312155a861f3de67cf93eafa39
|
data/lib/rest_my_case/base.rb
CHANGED
@@ -9,10 +9,6 @@ module RestMyCase
|
|
9
9
|
Judge::Base, DefenseAttorney::Base, RestMyCase::Base, Context::Base
|
10
10
|
end
|
11
11
|
|
12
|
-
def self.trial_court=(new_trial_court)
|
13
|
-
@trial_court = new_trial_court
|
14
|
-
end
|
15
|
-
|
16
12
|
def self.depends(*use_case_classes)
|
17
13
|
dependencies.push(*use_case_classes)
|
18
14
|
end
|
data/lib/rest_my_case/version.rb
CHANGED
@@ -34,20 +34,20 @@ describe RestMyCase::Status do
|
|
34
34
|
|
35
35
|
before { @context = StatusTestCase2.perform }
|
36
36
|
|
37
|
-
it "@context.status.unprocessable_entity? should be
|
38
|
-
expect(@context.status.unprocessable_entity?).to be
|
37
|
+
it "@context.status.unprocessable_entity? should be true" do
|
38
|
+
expect(@context.status.unprocessable_entity?).to be true
|
39
39
|
end
|
40
40
|
|
41
41
|
it "@context.next_line should be true" do
|
42
42
|
expect(@context.next_line).to be true
|
43
43
|
end
|
44
44
|
|
45
|
-
it "@context.status.ok? should be
|
46
|
-
expect(@context.status.ok?).to be
|
45
|
+
it "@context.status.ok? should be false" do
|
46
|
+
expect(@context.status.ok?).to be false
|
47
47
|
end
|
48
48
|
|
49
49
|
it "context's errors should have a proper message" do
|
50
|
-
expect(@context.errors).to match [a_hash_including({
|
50
|
+
expect(@context.errors).to match [a_hash_including({ status: :unprocessable_entity, message: nil, class_name: "StatusTestCase2" })]
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
@@ -62,20 +62,20 @@ describe RestMyCase::Status do
|
|
62
62
|
|
63
63
|
before { @context = StatusTestCase3.perform }
|
64
64
|
|
65
|
-
it "@context.status.internal_server_error? should be
|
66
|
-
expect(@context.status.internal_server_error?).to be
|
65
|
+
it "@context.status.internal_server_error? should be true" do
|
66
|
+
expect(@context.status.internal_server_error?).to be true
|
67
67
|
end
|
68
68
|
|
69
69
|
it "@context.next_line should raise an error" do
|
70
70
|
expect { context.next_line }.to raise_error
|
71
71
|
end
|
72
72
|
|
73
|
-
it "@context.status.ok? should be
|
74
|
-
expect(@context.status.ok?).to be
|
73
|
+
it "@context.status.ok? should be false" do
|
74
|
+
expect(@context.status.ok?).to be false
|
75
75
|
end
|
76
76
|
|
77
77
|
it "context's errors should have a proper message" do
|
78
|
-
expect(@context.errors).to match [a_hash_including({
|
78
|
+
expect(@context.errors).to match [a_hash_including({ status: :internal_server_error, message: nil, class_name: "StatusTestCase3" })]
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|