Commit Graph

14 Commits

Author SHA1 Message Date
Eloy Pérez f10e571f4d
Minor cleaning setting up tests (#1875)
We use minitest for Sinatra's test suite but we weren't using its rake task. I've updated the Rakefile to require and use Minitest default rake task to simplify.

Another change is to rename the `helper.rb` file to `test_helper.rb` because I think that name is used more in the community and require it directly without calling `File.expand_path`
2023-02-12 19:09:35 +01:00
Patrik Ragnarsson f9fa73da34 Revert "Allow running with Rack 3. (#1811)"
This reverts commit 2ccd0dc29d.

It doesn't make sense to have this in master when it is not working. CI
will install Rack 3 and fail jobs. We don't know if we break something
for Rack 2 now.
2022-12-28 21:21:08 +01:00
Samuel Williams 2ccd0dc29d
Allow running with Rack 3. (#1811)
* Allow running with Rack 3.

* Pull in `rack-session` gem if needed.

* Try again.

* Use separate gemfiles for testing.

* Better test titles.

* Fix dependency on rack-test.

* Add rackup gem.

* Fix server registration.

* Update rack version constraints

Co-authored-by: Jordan Owens <jkowens@gmail.com>
2022-12-23 14:58:28 -05:00
Olle Jonsson 1559a20b06 refactor: use __dir__ in File.expand_path
__dir__ is nice, and available.
2022-02-02 15:58:11 -05:00
Itamar Turner-Trauring e3635713ac Changelog and test. 2016-11-22 10:13:13 -05:00
Vasiliy Yaklushin d8a6930b1e Add quiet flag to server configuration (false by default)
It suppresses start and stop messages that Sinatra generates.
As requested here: https://github.com/sinatra/sinatra/issues/1148.
2016-07-26 11:30:05 +02:00
Vipul A M 23c2e197c8 - Removed test-unit dependency
- updated minitest to 5.0
- Removed Test::Unit::TestCase and started using Minitest::Test instead
- Fixed usage of assert_raise
- Fixed usage of refute_nil
- Fixed and removed usage of assert_nothing_raised
2015-01-11 01:00:47 +05:30
Zachary Scott 46e8bd67b3 First pass at block styles for tests
TODO:
* test/routing_test.rb
* test/settings_test.rb
2012-05-21 17:21:59 -04:00
Konstantin Haase ab221cc646 silence logs in server_test.rb again
Conflicts:

	test/server_test.rb
2011-06-16 14:03:29 +02:00
Konstantin Haase e001d62669 adjust require lines for test helper, so it also works properly on 1.9.2 2011-05-11 09:44:02 +02:00
Blake Mizerany 849a5a95fc using -b over -h option from cli for bind address
I've also renamed all occurrences of options.host
to options.bind
2010-02-04 17:16:05 -08:00
Ryan Tomayko 99aa7ecaf8 Use rack's new handler registration stuff to fix some failing specs 2009-05-20 18:13:38 -07:00
Simon Rozet ff0d068687 Use contest instead of test/spec/mini
See <http://github.com/citrusbyte/contest> for more info. The
contest.rb file is included under the test/ directory.
2009-03-31 02:23:48 -07:00
Ryan Tomayko bc7a939ce2 General spec coverage improvements (rcov: 98%) 2009-01-19 17:58:26 -08:00