forked from vcr/vcr
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hit a local sinatra app rather than example.com in specs.
- Loading branch information
1 parent
84992d2
commit 76137bf
Showing
7 changed files
with
56 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
* use `expect { }.to` rather than `lambda { }.should` in specs. | ||
* Use fakefs gem instead of using temp_dir in specs. | ||
* Use localhost server in specs instead of hitting example.com. | ||
* Fix #method vs .method in specs. |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require 'sinatra' | ||
|
||
module VCR | ||
class SinatraApp < ::Sinatra::Base | ||
get '/' do | ||
"GET to root" | ||
end | ||
|
||
get '/localhost_test' do | ||
"Localhost response" | ||
end | ||
|
||
get '/foo' do | ||
"FOO!" | ||
end | ||
|
||
def self.port | ||
server.port | ||
end | ||
|
||
def self.server | ||
@server ||= VCR::LocalhostServer.new(new) | ||
end | ||
end | ||
end |
This file contains 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