Project

General

Profile

Download (729 Bytes) Statistics
| Branch: | Tag: | Revision:

hammer-cli-csv / test / csv_test.rb @ d9498f54

1
require File.join(File.dirname(__FILE__), 'csv_test_helper')
2

    
3
describe 'csv' do
4
  extend CommandTestHelper
5

    
6
  context "help" do
7
    it "displays supported options" do
8
      set_user 'admin'
9

    
10
      stdout,stderr = capture {
11
        hammer.run(%W{csv --help})
12
      }
13
      stderr.must_equal ''
14
      stdout.must_equal <<-HELP
15
Usage:
16
     csv [OPTIONS] SUBCOMMAND [ARG] ...
17

18
Parameters:
19
 SUBCOMMAND                    subcommand
20
 [ARG] ...                     subcommand arguments
21

22
Subcommands:
23
 export                        export into directory
24
 import                        import by directory
25
 settings                      import or export settings
26

27
Options:
28
 -h, --help                    print help
29
HELP
30
    end
31
  end
32
end