lib/tasks/install.rake in knapsack_pro-0.25.0 vs lib/tasks/install.rake in knapsack_pro-0.26.0
- old
+ new
@@ -41,11 +41,11 @@
KnapsackPro::Adapters::SpinachAdapter.bind
}, color: :cyan
end
def step_for_vcr(prompt)
- prompt.say "Step for VCR gem", color: :yellow
+ prompt.say "Step for VCR/WebMock/FakeWeb gems", color: :yellow
prompt.say "Add Knapsack Pro API subdomain to ignore hosts"
prompt.say "in spec/spec_helper.rb or wherever is your VCR configuration:"
prompt.say %{
require 'vcr'
@@ -55,20 +55,25 @@
end
# add below when you hook into webmock
require 'webmock/rspec'
WebMock.disable_net_connect!(:allow => ['api.knapsackpro.com'])
+
+# add below when you use FakeWeb
+require 'fakeweb'
+FakeWeb.allow_net_connect = %r[^https?://api\.knapsackpro\.com]
}, color: :cyan
puts
prompt.say "Ensure you have require false in Gemfile for webmock gem when VCR is hook into it. Thanks to that webmock configuration in spec_helper.rb is loaded properly."
prompt.say %{
group :test do
gem 'vcr'
gem 'webmock', require: false
+ gem 'fakeweb', require: false # example when you use fakeweb
end
}, color: :cyan
end
def step_for_ci_circle(prompt, answers)
@@ -269,10 +274,10 @@
answers[:testing_tools] = []
while answers[:testing_tools].empty?
answers[:testing_tools] = prompt.multi_select("Choose your testing tools:", TESTING_TOOLS_CHOICES)
end
- answers[:has_vcr] = prompt.yes?('Do you use VCR gem?')
+ answers[:has_vcr] = prompt.yes?('Do you use VCR, WebMock or FakeWeb gem?')
CI_PROVIDER_CHOICES = {
'https://circleci.com' => :circle,
'https://travis-ci.org' => :travis,
'https://buildkite.com' => :buildkite,