Sha256: 8431501a6ddc3f24de5fa849ad4f2739bdbcc7c2ea3b9c32d52e21f78ed0eb6b

Contents?: true

Size: 1.26 KB

Versions: 6

Compression:

Stored size: 1.26 KB

Contents

#
# Description
#
# Author:: Robert Sharp
# Copyright:: Copyright (c) 2010 Robert Sharp
# License:: Open Software Licence v3.0
#
# This software is licensed for use under the Open Software Licence v. 3.0
# The terms of this licence can be found at http://www.opensource.org/licenses/osl-3.0.php
# and in the file copyright.txt. Under the terms of this licence, all derivative works
# must themselves be licensed under the Open Software Licence v. 3.0
# 
# 

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
require 'jerbil/jerbil_service/base'
require 'jerbil'
require File.expand_path(File.dirname(__FILE__) + '/../test/test_service')


describe "Test Service Class" do



  it "should start and stop OK" do
    pkey = "ABCDEF"
    jerbil_test = get_test_jerbil
    Jerbil.stub(:get_local_server).and_return(jerbil_test)
    tservice = TestService.new(pkey, :log_dir => "/home/robert/dev/projects/jerbil/log", :log_level => :debug, :exit_on_stop=>false)
    tservice.action.should == "Hello"
    tservice.stop_callback(pkey) # make sure you do not kill anything
  end


end

def get_test_jerbil
  config_file = File.expand_path(File.dirname(__FILE__) + '/../test/conf.d/jerbil.conf')
  config = Jerbil.get_config(config_file)
  return Jerbil.get_local_server(config)
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
jerbil-1.4.8 spec/jerbil_service_spec.rb
jerbil-1.4.7 spec/jerbil_service_spec.rb
jerbil-1.4.6 spec/jerbil_service_spec.rb
jerbil-1.4.5 spec/jerbil_service_spec.rb
jerbil-1.3.3 spec/jerbil_service_spec.rb
jerbil-1.2.2 spec/jerbil_service_spec.rb