Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 1035 Bytes
1 | require "#{File.dirname(__FILE__)}/spec_setup" |
2 | |
3 | def dumb_app(env) |
4 | body = block_given? ? [yield] : ['Hi'] |
5 | [ 200, {'Content-Type' => 'text/plain'}, body ] |
6 | end |
7 | |
8 | describe 'Rack::Cache::new' do |
9 | before { @app = method(:dumb_app) } |
10 | |
11 | it 'takes a backend and returns a middleware component' do |
12 | Rack::Cache.new(@app). |
13 | should.respond_to :call |
14 | end |
15 | |
16 | it 'takes an options Hash' do |
17 | lambda { Rack::Cache.new(@app, {}) }. |
18 | should.not.raise(ArgumentError) |
19 | end |
20 | |
21 | it 'sets options provided in the options Hash' do |
22 | object = Rack::Cache.new(@app, :foo => 'bar', 'foo.bar' => 'bling') |
23 | object.options['foo.bar'].should.equal 'bling' |
24 | object.options['rack-cache.foo'].should.equal 'bar' |
25 | end |
26 | |
27 | it 'takes a block; executes it during initialization' do |
28 | state, object = 'not invoked', nil |
29 | instance = |
30 | Rack::Cache.new @app do |cache| |
31 | object = cache |
32 | state = 'invoked' |
33 | cache.should.respond_to :set |
34 | end |
35 | state.should.equal 'invoked' |
36 | object.should.be instance |
37 | end |
38 | end |