rest-in-peace 1.3.0 → 1.3.1
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.3.1
|
@@ -22,6 +22,12 @@ describe RESTinPeace::ResponseConverter do
|
|
22
22
|
specify { expect(subject).to eq(OpenStruct.new(name: 'test1')) }
|
23
23
|
end
|
24
24
|
|
25
|
+
shared_examples_for 'a string input' do
|
26
|
+
let(:response_body) { 'yolo binary stuff' }
|
27
|
+
specify { expect(subject).to be_instance_of(String) }
|
28
|
+
specify { expect(subject).to eq('yolo binary stuff') }
|
29
|
+
end
|
30
|
+
|
25
31
|
context 'given type is a class' do
|
26
32
|
let(:klass) { OpenStruct }
|
27
33
|
context 'input is an array' do
|
@@ -31,6 +37,10 @@ describe RESTinPeace::ResponseConverter do
|
|
31
37
|
context 'input is a hash' do
|
32
38
|
it_behaves_like 'a hash input'
|
33
39
|
end
|
40
|
+
|
41
|
+
context 'input is a string' do
|
42
|
+
it_behaves_like 'a string input'
|
43
|
+
end
|
34
44
|
end
|
35
45
|
|
36
46
|
context 'given type is an instance' do
|
@@ -42,6 +52,10 @@ describe RESTinPeace::ResponseConverter do
|
|
42
52
|
context 'input is a hash' do
|
43
53
|
it_behaves_like 'a hash input'
|
44
54
|
end
|
55
|
+
|
56
|
+
context 'input is a string' do
|
57
|
+
it_behaves_like 'a string input'
|
58
|
+
end
|
45
59
|
end
|
46
60
|
end
|
47
61
|
end
|