Permalink
Browse files

Add rails generator to stop test server.

  • Loading branch information...
1 parent 7bb742e commit 7c36ed9e06bfbe2439ca9155a36b837607c1004c @tmcgilchrist tmcgilchrist committed Apr 11, 2013
@@ -21,7 +21,8 @@ def create_rspec_file
end
inject_into_file 'spec/spec_helper.rb', :after => rspec_prelude do
"\n#{indentation} config.before(:suite) { Ripple::TestServer.setup }" +
- "\n#{indentation} config.after(:each) { Ripple::TestServer.clear }\n"
+ "\n#{indentation} config.after(:each) { Ripple::TestServer.clear }" +
+ "\n#{indentation} config.after(:suite) { Ripple::TestServer.instance.stop }\n"
end
end
end
@@ -37,6 +37,7 @@
it "should insert the test server setup" do
contents.should include(" config.before(:suite) { Ripple::TestServer.setup }")
contents.should include(" config.after(:each) { Ripple::TestServer.clear }")
+ contents.should include(" config.after(:suite) { Ripple::TestServer.instance.stop }")
end
context "when the configuration block is indented" do
@@ -59,6 +60,7 @@
it "should insert the test server setup with additional indentation" do
contents.should include(" config.before(:suite) { Ripple::TestServer.setup }")
contents.should include(" config.after(:each) { Ripple::TestServer.clear }")
+ contents.should include(" config.after(:suite) { Ripple::TestServer.instance.stop }")
end
end
end

0 comments on commit 7c36ed9

Please sign in to comment.