Skip to content

Commit 71a8c4c

Browse files
committed
Add common request failure behaviour.
1 parent 5a0417b commit 71a8c4c

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# encoding: utf-8
2+
3+
shared_examples_for 'request failure' do
4+
5+
context "resource not found" do
6+
let(:body) { "" }
7+
let(:status) { [404, "Not Found"] }
8+
9+
it "should fail to retrive resource" do
10+
expect {
11+
requestable
12+
}.to raise_error(Github::Error::NotFound)
13+
end
14+
end
15+
16+
end

0 commit comments

Comments
 (0)