зеркало из https://github.com/github/pages-gem.git
Merge pull request #608 from github/webmock
Enable WebMock so we aren't hitting the World Wide Web in our tests
This commit is contained in:
Коммит
840709cf51
4
Gemfile
4
Gemfile
|
@ -6,3 +6,7 @@ gemspec
|
|||
|
||||
# Whitelisted plugins not included in runtime dependencies.
|
||||
gem "jekyll-octicons"
|
||||
|
||||
group :test do
|
||||
gem "webmock"
|
||||
end
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
require File.expand_path("../lib/github-pages.rb", __dir__)
|
||||
require "open3"
|
||||
require "webmock/rspec"
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.run_all_when_everything_filtered = true
|
||||
|
@ -12,6 +13,12 @@ RSpec.configure do |config|
|
|||
# the seed, which is printed after each run.
|
||||
# --seed 1234
|
||||
config.order = "random"
|
||||
|
||||
# Stub all GitHub API requests so they come back empty.
|
||||
config.before(:each) do
|
||||
stub_request(:get, /api.github.com/)
|
||||
.to_return(:status => 200, :body => "{}", :headers => {})
|
||||
end
|
||||
end
|
||||
|
||||
def fixture_dir
|
||||
|
|
Загрузка…
Ссылка в новой задаче