Sha256: 21e8fa924c157fe778cff5fc6f6731b6904f6bcd06bfa4fca69a4ca2b88950a5

Contents?: true

Size: 1.64 KB

Versions: 19

Compression:

Stored size: 1.64 KB

Contents

require 'spec/helper'

class SpecMock
  include Innate::Node
  map '/'

  def index
    ''
  end
end

class SpecMock2
  include Innate::Node
  map '/deep'

  def index
    'spec mock 2'
  end

  def foo
    'spec mock 2 foo'
  end
end

describe 'Innate::SpeckMock2' do
  should 'handle get request' do
    response = Innate::Mock.get('/deep/foo')
    # '/foo/bar'
    response.status.should == 200
    response.body.should == 'spec mock 2 foo'
  end
end

describe 'Innate::SpecMock' do
  should 'handle get request' do
    response = Innate::Mock.get('/')
    # '/one'
    response.status.should == 200
    response.body.should == ''
  end

  should 'handle post request' do
    response = Innate::Mock.post('/')
    # '/'
    response.status.should == 200
    response.body.should == ''
  end

  should 'handle head request' do
    response = Innate::Mock.head('/')
    response.status.should == 200
    response.body.should == ''
  end

  should 'handle delete request' do
    response = Innate::Mock.delete('/')
    response.status.should == 200
    response.body.should == ''
  end

  should 'handle put request' do
    response = Innate::Mock.put('/')
    response.status.should == 200
    response.body.should == ''
  end

  should 'handle options request' do
    response = Innate::Mock.options('/')
    response.status.should == 200
    response.body.should == ''
  end

  should 'handle connect request' do
    response = Innate::Mock.connect('/')
    response.status.should == 200
    response.body.should == ''
  end

  should 'handle trace request' do
    response = Innate::Mock.trace('/')
    response.status.should == 200
    response.body.should == ''
  end
end

Version data entries

19 entries across 19 versions & 3 rubygems

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