File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 51
51
end
52
52
53
53
context 'test raise_on requests' do
54
- let ( :request ) { HTTParty ::Request . new ( Net ::HTTP ::Get , '/' , raise_on : [ 404 ] ) }
54
+ let ( :raise_on ) { [ 404 ] }
55
+ let ( :request ) { HTTParty ::Request . new ( Net ::HTTP ::Get , '/' , raise_on : raise_on ) }
55
56
let ( :body ) { 'Not Found' }
56
57
let ( :response ) { Net ::HTTPNotFound . new ( '1.1' , 404 , body ) }
57
58
71
72
end
72
73
73
74
context "and response's status code is not in range" do
74
- subject { described_class . new ( request , @response_object , @parsed_response ) }
75
+ let ( :response ) { Net :: HTTPNotFound . new ( '1.1' , 200 , body ) }
75
76
76
77
it 'does not throw exception' do
77
78
expect { subject } . not_to raise_error
89
90
end
90
91
91
92
context "and response's status code is not in range" do
92
- subject { described_class . new ( request , @response_object , @parsed_response ) }
93
+ let ( :response ) { Net :: HTTPNotFound . new ( '1.1' , 200 , body ) }
93
94
94
95
it 'does not throw exception' do
95
96
expect { subject } . not_to raise_error
You can’t perform that action at this time.
0 commit comments