Sha256: 9a0b41e577d51abaa805ab8825c3241568d31fdda73039419b6ac308b1a611d7

Contents?: true

Size: 606 Bytes

Versions: 8

Compression:

Stored size: 606 Bytes

Contents

require 'spec_helper'
require 'gisele/command'
module Gisele
  describe 'the `gisele` commandline tool' do

    Path.dir.glob("**/*.cmd").each do |cmdfile|

      it "executes `#{cmdfile}` as expected" do
        command = cmdfile.read.strip
        argv    = Quickl.parse_commandline_args(command)[1..-1]
        stdout  = cmdfile.sub_ext('.stdout').read

        out, err = capture_io do
          begin
            Dir.chdir(fixtures_dir){ Command.run(argv) }
          rescue SystemExit
            puts "SystemExit"
          end
        end

        out.should eq stdout
      end

    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gisele-0.6.0 spec/command/test_command.rb
gisele-0.5.1 spec/command/test_command.rb
gisele-0.5.0 spec/command/test_command.rb
gisele-0.4.0 spec/command/test_command.rb
gisele-0.3.0 spec/command/test_command.rb
gisele-0.2.0 spec/command/test_command.rb
gisele-0.1.0 spec/command/test_command.rb
gisele-0.0.1 spec/command/test_command.rb