File: command_spec.rb

package info (click to toggle)
thin 1.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,084 kB
  • sloc: ruby: 4,138; ansic: 1,537; sh: 82; makefile: 8
file content (25 lines) | stat: -rw-r--r-- 739 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require 'spec_helper'

describe Command do
  before do
    Command.script = 'thin'
    @command = Command.new(:start, :port => 3000, :daemonize => true, :log => 'hi.log',
                           :require => %w(rubygems thin), :no_epoll => true)
  end
  
  it 'should shellify command' do
    out = @command.shellify
    out.should include('--port=3000', '--daemonize', '--log="hi.log"', 'thin start --')
    out.should_not include('--pid')
  end
  
  it 'should shellify Array argument to multiple parameters' do
    out = @command.shellify
    out.should include('--require="rubygems"', '--require="thin"')
  end

  it 'should convert _ to - in option name' do
    out = @command.shellify
    out.should include('--no-epoll')
  end
end