Sha256: e1fd8164a4f9d32318a2c37d7ad64ac8d1cf9aedae7490780cb9e055161cc603

Contents?: true

Size: 1.22 KB

Versions: 28

Compression:

Stored size: 1.22 KB

Contents

# encoding: ascii-8bit

# Copyright 2014 Ball Aerospace & Technologies Corp.
# All Rights Reserved.
#
# This program is free software; you can modify and/or redistribute it
# under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 3 with
# attribution addendums as found in the LICENSE.txt

require 'spec_helper'
require 'cosmos'
require 'cosmos/tools/cmd_tlm_server/background_task'

module Cosmos
  describe BackgroundTask do
    describe "initialize" do
      it "initializes local variables" do
        b1 = BackgroundTask.new
        expect(b1.name).to match(/Background Task \d+/)
        expect(b1.thread).to be_nil
        expect(b1.status).to eq ''
        expect(b1.stopped).to eq false
        b2 = BackgroundTask.new
        expect(b2.name).to match(/Background Task \d+/)
        expect(b1.thread).to be_nil
        expect(b1.status).to eq ''
        expect(b2.stopped).to eq false
      end
    end

    describe "call" do
      it "raises an error" do
        expect { BackgroundTask.new.call }.to raise_error(/must be defined by subclass/)
      end
    end

    describe "stop" do
      it "exists" do
        expect(BackgroundTask.new).to respond_to(:stop)
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
cosmos-4.5.2-java spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.5.2 spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.5.1-java spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.5.1 spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.5.0-java spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.5.0 spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.4.2-java spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.4.2 spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.4.1-java spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.4.1 spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.4.0-java spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.4.0 spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.3.0-java spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.3.0 spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.2.4-java spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.2.4 spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.2.3-java spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.2.3 spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.2.2-java spec/tools/cmd_tlm_server/background_task_spec.rb
cosmos-4.2.2 spec/tools/cmd_tlm_server/background_task_spec.rb