Sha256: b3f4d8670bff6d61e8c135dbe92a7fdc5bd991807399e922ccad01e1a6578a1e

Contents?: true

Size: 930 Bytes

Versions: 6

Compression:

Stored size: 930 Bytes

Contents

require 'test_helper'

class CommandLineTest < Test::Unit::TestCase
  
  context "A CloudCrowd::CommandLine" do
    
    should "install into the directory that you ask it to" do
      dir = 'tmp/test_install_dir'
      ARGV.replace ['install', dir]
      CloudCrowd::CommandLine.new
      assert File.exists?(dir)
      assert File.directory?(dir)
      CloudCrowd::CommandLine::CONFIG_FILES.each do |file|
        assert File.exists?("#{dir}/#{file}")
      end
      FileUtils.rm_r(dir)
    end
    
    should "mix in CloudCrowd to the top level of `crowd console` sessions" do
      require 'irb'
      ARGV.replace ['-c', 'test/config', 'console']
      IRB.expects(:start)
      CloudCrowd::CommandLine.new
      ['Job', 'WorkUnit', 'Server', 'Node', 'SUCCEEDED', 'FAILED'].each do |constant|
        assert Object.constants.include?(constant.to_sym), "CommandLine includes #{constant}"
      end
    end
    
  end
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cloud-crowd-0.7.2 test/unit/test_command_line.rb
cloud-crowd-0.7.2.beta test/unit/test_command_line.rb
cloud-crowd-0.7.2.pre3 test/unit/test_command_line.rb
cloud-crowd-0.7.2.pre2 test/unit/test_command_line.rb
cloud-crowd-0.7.2.pre test/unit/test_command_line.rb
cloud-crowd-0.7.1 test/unit/test_command_line.rb