File: provides.rb

package info (click to toggle)
ruby-innate 2013.02.21-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 848 kB
  • ctags: 622
  • sloc: ruby: 4,340; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 459 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require File.expand_path('../../helper', __FILE__)
require File.expand_path('../../../example/provides', __FILE__)

describe 'examples/provide' do
  behaves_like :rack_test

  it 'provides YAML representation' do
    get '/list.yaml'
    last_response.body.should == ARTICLES.to_yaml
    last_response['Content-Type'].should == 'text/yaml'

    get '/list'
    last_response.body.should == ''
    last_response['Content-Type'].should == 'text/html'
  end
end