Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dasch/riot-rack
Riot::Rack -- easily test Rack apps using Riot!
https://github.com/dasch/riot-rack
Last synced: 24 days ago
JSON representation
Riot::Rack -- easily test Rack apps using Riot!
- Host: GitHub
- URL: https://github.com/dasch/riot-rack
- Owner: dasch
- License: mit
- Created: 2010-01-15T10:01:09.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2013-01-08T15:14:05.000Z (almost 12 years ago)
- Last Synced: 2023-04-11T15:32:55.197Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 125 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# Riot::Rack
Use [Riot](http://github.com/thumblemonks/riot/) to test your [Rack](http://rack.rubyforge.org/)
apps easily!Here's the gist of it:
```ruby
require 'riot'
require 'riot/rack'context "HelloWorldApp" do
# Specify your app using the #app helper. If you don't specify
# one, Riot::Rack will recursively look for a config.ru file.
# Takes either an app class or a block argument.
app {|env| [200, {}, "Hello, World!"] }
# Alternatively:
app(HelloWorldApp)
# You can use all the Rack::Test helpers in the setup blocks.
setup { get '/' }
# You can access the response directly.
asserts(:status).equals(200)
asserts(:body).equals("Hello, World!")
end
```## Installation
Add Gemcutter to your gem sources:
sudo gem sources -a http://gemcutter.org
Then, simply install the riot-rack gem like so:
sudo gem install riot-rack
## Prerequisites
- [Riot](http://github.com/thumblemonks/riot)
- [Rack::Test](http://github.com/brynary/rack-test)## License
Copyright (c) 2010 Daniel Schierbeck, Brian Carlson.
Riot is released under the MIT license. See {file:MIT-LICENSE}.