Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

Add Sinatra::Runner For Managing Sinatra Servers #122

Merged
merged 8 commits into from
Jul 21, 2016

Conversation

apotonick
Copy link
Contributor

This is extremely useful e.g. if you wanna test your REST client against a real backend (with real network calls). Assuming the test backend is a sinatra app, this class helps you to start and stop the server in your test.

module Sinatra
class Runner
def app_file
File.expand_path("../server.rb", __FILE__)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be configurable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is, by overriding this method.

@rkh
Copy link
Member

rkh commented Mar 7, 2014

No tests. :(

end

def run
#puts command
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove the puts

@zzak zzak added this to the 1.5 milestone Feb 6, 2015
@zzak zzak added the feature label Feb 6, 2015
@zzak
Copy link
Member

zzak commented Feb 6, 2015

We'll look into this for Sinatra 1.5

@zzak
Copy link
Member

zzak commented May 3, 2016

@apotonick Find a way to make it configurable, remove the #puts statement, and add some tests and you're good

@zzak
Copy link
Member

zzak commented Jul 21, 2016

Ok, I'm going to merge this, even without the configure option (since there is a workaround) and tests.

It's a new feature, that I will mark as experimental, so I'm fine if we add them later.

@zzak zzak merged commit 632945f into sinatra:master Jul 21, 2016
zzak pushed a commit to zzak/sinatra-contrib that referenced this pull request Jul 22, 2016
Add Sinatra::Runner For Managing Sinatra Servers
myabc added a commit to myabc/roar that referenced this pull request Dec 9, 2016
sinatra/sinatra-contrib#122 has been merged.

Closes trailblazer#195.

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants