Sha256: 673dbc5b027a81cf7fef1dd64ef4ef670f039a97ef02ee48366a8992601e1d22

Contents?: true

Size: 1.21 KB

Versions: 2

Compression:

Stored size: 1.21 KB

Contents

#!/usr/bin/env ruby -w
# encoding: UTF-8
#
# = Tj3Daemon_spec.rb -- The TaskJuggler III Project Management Software
#
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011
#               by Chris Schlaeger <chris@linux.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#

require 'rubygems'
require 'support/DaemonControl'

class TaskJuggler

  describe Tj3Daemon do

    include DaemonControl

    before(:each) do
      cleanup
      startDaemon
    end

    after(:each) do
      stopDaemon
      cleanup
    end

    it 'should be startable and stopable' do
      res = stdIoWrapper do
        Tj3Client.new.main(%w( --unsafe --silent status ))
      end
      res.returnValue.should == 0
      res.stdErr.should == ''
      res.stdOut.should match /No projects registered/
    end

    it 'should be able to load a project' do
      prj = 'project foo "Foo" 2011-03-14 +1d task "Foo"'
      res = stdIoWrapper(prj) do
        Tj3Client.new.main(%w( --unsafe --silent add . ))
      end
      res.returnValue.should == 0
      res.stdErr.should match /Project foo loaded/
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
taskjuggler-3.0.0 spec/Tj3Daemon_spec.rb
taskjuggler-0.2.2 spec/Tj3Daemon_spec.rb