Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Add option to process / generate the site on the same thread #52

Open
esbanarango opened this issue Nov 20, 2017 · 0 comments · May be fixed by #53
Open

Add option to process / generate the site on the same thread #52

esbanarango opened this issue Nov 20, 2017 · 0 comments · May be fixed by #53

Comments

@esbanarango
Copy link

Hello and thank you for this project.

At Envoy we are using rack-jekyll to test our jekyll site with RSpec and Capybara. We want to build the site every time we run the tests and put it on an specific directory (if it doesn't exist already). But building the site takes some time and as it's running on a separate thread by the time we run RSspec and Capybara tests the site isn't ready.

spec_helper.rb
require 'rspec'
require 'capybara/rspec'
require 'rack/jekyll'
require 'rack/test'
WebMock.allow_net_connect!

RSpec.configure do |config|
  # ...
  # Configure Capybara to load the website through rack-jekyll.
  # (force_build: true) builds the site before the tests are run,
  # so our tests are always running against the latest version
  # of our jekyll site.
  Capybara.app = Rack::Jekyll.new(force_build: true, config: '_test_config.yml')
end
@esbanarango esbanarango linked a pull request Nov 20, 2017 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant