rest_my_case 1.11.1 → 1.11.2
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.
- checksums.yaml +4 -4
- data/lib/rest_my_case/http_status.rb +8 -3
- data/lib/rest_my_case/status.rb +8 -3
- data/lib/rest_my_case/version.rb +1 -1
- data/spec/rest_my_case/http_status_spec.rb +14 -0
- data/spec/rest_my_case/status_spec.rb +14 -0
- 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: fe38b660d35df2e2dec83374863b36ed20da5daf
|
4
|
+
data.tar.gz: 5f21b8a28eac1f8445edcb018b248ca1135adef2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8717ffd4ad841b7a953ee6ee0cc2d963629ee012c911968044f0da436bf6be50baf5cc90a821b37a11a8883668ce979684f9145e81f83fea6833edf0734ff9c4
|
7
|
+
data.tar.gz: 684501bd0353d6969d38507dbd4b254468f4867cb2966ca138e497ddb774182916dcac4a8d35d4999cd46a5c6453305587984634750b7b50e0bd8c4f70802682
|
@@ -6,10 +6,15 @@ module RestMyCase
|
|
6
6
|
|
7
7
|
include Status
|
8
8
|
|
9
|
-
|
10
|
-
|
9
|
+
module ClassMethods
|
10
|
+
def trial_court
|
11
|
+
@trial_court ||= Trial::Court.new \
|
12
|
+
Judge::Base, DefenseAttorney::Base, Base, Context::HttpStatus
|
13
|
+
end
|
14
|
+
end
|
11
15
|
|
12
|
-
|
16
|
+
def self.included(parent_class)
|
17
|
+
parent_class.extend ClassMethods
|
13
18
|
end
|
14
19
|
|
15
20
|
end
|
data/lib/rest_my_case/status.rb
CHANGED
@@ -4,10 +4,15 @@ module RestMyCase
|
|
4
4
|
|
5
5
|
module Status
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
module ClassMethods
|
8
|
+
def trial_court
|
9
|
+
@trial_court ||= Trial::Court.new \
|
10
|
+
Judge::Base, DefenseAttorney::Base, Base, Context::Status
|
11
|
+
end
|
12
|
+
end
|
9
13
|
|
10
|
-
|
14
|
+
def self.included(parent_class)
|
15
|
+
parent_class.extend ClassMethods
|
11
16
|
end
|
12
17
|
|
13
18
|
def status
|
data/lib/rest_my_case/version.rb
CHANGED
@@ -53,4 +53,18 @@ describe RestMyCase::HttpStatus do
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
+
context "When a class inherits from another" do
|
57
|
+
HttpStatusTestCase1 = Class.new(RestMyCase::Base) do
|
58
|
+
include RestMyCase::HttpStatus
|
59
|
+
end
|
60
|
+
|
61
|
+
HttpStatusTestCase2 = Class.new(HttpStatusTestCase1)
|
62
|
+
|
63
|
+
before { @context = HttpStatusTestCase2.perform }
|
64
|
+
|
65
|
+
it "context should be Context::HttpStatus" do
|
66
|
+
expect(@context.class).to be RestMyCase::Context::HttpStatus
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
56
70
|
end
|
@@ -163,6 +163,20 @@ describe RestMyCase::Status do
|
|
163
163
|
end
|
164
164
|
end
|
165
165
|
|
166
|
+
context "When a class inherits from another" do
|
167
|
+
StatusTestCase7 = Class.new(RestMyCase::Base) do
|
168
|
+
include RestMyCase::Status
|
169
|
+
end
|
170
|
+
|
171
|
+
StatusTestCase8 = Class.new(StatusTestCase7)
|
172
|
+
|
173
|
+
before { @context = StatusTestCase8.perform }
|
174
|
+
|
175
|
+
it "context should be Context::Status" do
|
176
|
+
expect(@context.class).to be RestMyCase::Context::Status
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
166
180
|
end
|
167
181
|
|
168
182
|
end
|