Skip to content
Newer
Older
100644 54 lines (43 sloc) 1.21 KB
e84408f @scrapper Moving daemon and client entry code into apps directory.
scrapper authored Mar 13, 2011
1 #!/usr/bin/env ruby -w
2 # encoding: UTF-8
3 #
4 # = Tj3Daemon_spec.rb -- The TaskJuggler III Project Management Software
5 #
a98afd4 @scrapper Welcome 2012!
scrapper authored Jan 10, 2012
6 # Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
e84408f @scrapper Moving daemon and client entry code into apps directory.
scrapper authored Mar 13, 2011
7 # by Chris Schlaeger <chris@linux.com>
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of version 2 of the GNU General Public License as
11 # published by the Free Software Foundation.
12 #
13
14 require 'rubygems'
83f0ec0 @scrapper All programs now have a proper entry class that is derived of off Tj3…
scrapper authored Mar 15, 2011
15 require 'support/DaemonControl'
e84408f @scrapper Moving daemon and client entry code into apps directory.
scrapper authored Mar 13, 2011
16
17 class TaskJuggler
18
19 describe Tj3Daemon do
20
83f0ec0 @scrapper All programs now have a proper entry class that is derived of off Tj3…
scrapper authored Mar 15, 2011
21 include DaemonControl
e84408f @scrapper Moving daemon and client entry code into apps directory.
scrapper authored Mar 13, 2011
22
ca1bca2 @scrapper Converting tj3 to use Tj3AppBase class.
scrapper authored Mar 15, 2011
23 before(:each) do
8c3f28f @scrapper New: Using a standard gemspec file to build the gem package.
scrapper authored Jul 16, 2011
24 cleanup
83f0ec0 @scrapper All programs now have a proper entry class that is derived of off Tj3…
scrapper authored Mar 15, 2011
25 startDaemon
e84408f @scrapper Moving daemon and client entry code into apps directory.
scrapper authored Mar 13, 2011
26 end
27
ca1bca2 @scrapper Converting tj3 to use Tj3AppBase class.
scrapper authored Mar 15, 2011
28 after(:each) do
83f0ec0 @scrapper All programs now have a proper entry class that is derived of off Tj3…
scrapper authored Mar 15, 2011
29 stopDaemon
8c3f28f @scrapper New: Using a standard gemspec file to build the gem package.
scrapper authored Jul 16, 2011
30 cleanup
e84408f @scrapper Moving daemon and client entry code into apps directory.
scrapper authored Mar 13, 2011
31 end
32
ca1bca2 @scrapper Converting tj3 to use Tj3AppBase class.
scrapper authored Mar 15, 2011
33 it 'should be startable and stopable' do
34 res = stdIoWrapper do
35 Tj3Client.new.main(%w( --unsafe --silent status ))
36 end
37 res.returnValue.should == 0
38 res.stdErr.should == ''
39 res.stdOut.should match /No projects registered/
40 end
41
42 it 'should be able to load a project' do
43 prj = 'project foo "Foo" 2011-03-14 +1d task "Foo"'
44 res = stdIoWrapper(prj) do
644c1ed @scrapper Replacing the LogFile with MessageHandler.
scrapper authored Feb 18, 2012
45 Tj3Client.new.main(%w( --unsafe add . ))
e84408f @scrapper Moving daemon and client entry code into apps directory.
scrapper authored Mar 13, 2011
46 end
ca1bca2 @scrapper Converting tj3 to use Tj3AppBase class.
scrapper authored Mar 15, 2011
47 res.returnValue.should == 0
644c1ed @scrapper Replacing the LogFile with MessageHandler.
scrapper authored Feb 18, 2012
48 res.stdErr.should match /Project\(s\) \. added/
e84408f @scrapper Moving daemon and client entry code into apps directory.
scrapper authored Mar 13, 2011
49 end
50
51 end
52
53 end
Something went wrong with that request. Please try again.