Sha256: 7752a4e3b55489a0ec1d32cb71cc97829ee03d32914a5632328e1de7f9db22aa

Contents?: true

Size: 522 Bytes

Versions: 19

Compression:

Stored size: 522 Bytes

Contents

require 'spec/helper'

describe Innate::DynaMap do
  @app = lambda{|env| [200, {}, ['pass']] }

  should 'raise if nothing is mapped' do
    lambda{ Innate::DynaMap.call({}) }.should.raise(RuntimeError)
  end

  should 'not raise if nothing is mapped' do
    Innate.map('/', &@app)
    Innate::DynaMap.call('SCRIPT_NAME' => '/').should == [200, {}, ['pass']]
  end

  should 'return mapped object' do
    Innate.at('/').should == @app
  end

  should 'return path to object' do
    Innate.to(@app).should == '/'
  end
end

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
manveru-innate-2009.02.06 spec/innate/dynamap.rb
manveru-innate-2009.02.21 spec/innate/dynamap.rb
manveru-innate-2009.02.25 spec/innate/dynamap.rb
manveru-innate-2009.03.24 spec/innate/dynamap.rb
manveru-innate-2009.04.01 spec/innate/dynamap.rb
manveru-innate-2009.04.08 spec/innate/dynamap.rb
manveru-innate-2009.04.18 spec/innate/dynamap.rb
manveru-innate-2009.04 spec/innate/dynamap.rb
manveru-innate-2009.05 spec/innate/dynamap.rb
manveru-innate-2009.06.12 spec/innate/dynamap.rb
manveru-innate-2009.06 spec/innate/dynamap.rb
rjspotter-innate-2009.06.29 spec/innate/dynamap.rb
rjspotter-innate-2009.06.30 spec/innate/dynamap.rb
rjspotter-innate-2009.06.31 spec/innate/dynamap.rb
innate-2009.04.12 spec/innate/dynamap.rb
innate-2009.04 spec/innate/dynamap.rb
innate-2009.05 spec/innate/dynamap.rb
innate-2009.06.12 spec/innate/dynamap.rb
innate-2009.06 spec/innate/dynamap.rb