Sha256: dd3531d5e8636452c968ef2e655bd78738cac4e64987392ae1ff6149bc3e5389

Contents?: true

Size: 605 Bytes

Versions: 6

Compression:

Stored size: 605 Bytes

Contents

# -*- coding: utf-8 -*-
require File.join(File.dirname(__FILE__), "..", "..", "spec_helper")

describe CliTree do

  it "should accepts '--format sqlite -o test.db' switches" do
    db_filename = File.join(FIXTURES, 'tmp', 'test.db')

    File.unlink(db_filename) if File.exist?(db_filename)

    captured = capture_output do
      args = %w{--format sqlite -o } << db_filename
      args << File.join(FIXTURES, "test_dir_1")
      CliTree.new.parse_args(args)
    end

    File.exist?(db_filename).should be_true

    File.unlink(db_filename) if File.exist?(db_filename)
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tree.rb-0.3.11 spec/tree_rb/cli/cli_tree_sqlite_spec.rb
tree.rb-0.3.10 spec/tree_rb/cli/cli_tree_sqlite_spec.rb
tree.rb-0.3.9 spec/tree_rb/cli/cli_tree_sqlite_spec.rb
tree.rb-0.3.8 spec/tree_rb/cli/cli_tree_sqlite_spec.rb
tree.rb-0.3.7 spec/tree_rb/cli/cli_tree_sqlite_spec.rb
tree.rb-0.3.6 spec/tree_rb/cli/cli_tree_sqlite_spec.rb