-
-
Save lukemorton/bd03c2e290c9014b5b3726932b53540c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyHTTP | |
def get(uri) | |
@response = HTTP.get(uri) | |
end | |
def response | |
@response | |
end | |
end | |
describe MyHTTP do | |
let(:http) { MyHTTP.new } | |
context 'when retrieving response' do | |
subject { http.response } | |
context 'after getting uri' do | |
before { http.get('/') } | |
it { is_expected.not_to be_null } | |
end | |
context 'without getting' do | |
it { is_expected.to be_null } | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MySimpleHTTP | |
def get(uri) | |
HTTP.get(uri) | |
end | |
end | |
describe MySimpleHTTP do | |
let(:http) { MySimpleHTTP.new } | |
context 'when getting uri' do | |
subject { http.get('/') } | |
it { is_expected.not_to be_null } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment