Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CLI specs #3

Open
jamesarosen opened this issue Oct 21, 2013 · 0 comments
Open

Fix CLI specs #3

jamesarosen opened this issue Oct 21, 2013 · 0 comments

Comments

@jamesarosen
Copy link
Member

The CLI specs are failing right now because they rely on stubbing the HTTP responses, but the stubbing happens in-process, while the calls happens within a subprocess via

`ahab fetch`
  1. add rack-stubs to the test dependencies
  2. spin up a Rack application in a child process that uses RackStubs::Middleware
  3. change the HTTP-related steps to stub requests via POSTs to that server
  4. change the CLI-related steps to refer to that server
  5. ensure the subprocess is torn down before the test process exits

Some things that might be helpful:

  • pid = fork do ... end
  • Process.wait(pid)
  • at_exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant