Sha256: 17dbc723b23e6baa0f78d0dd1862353567a2965bb98a524335ba67bfd4d8982d

Contents?: true

Size: 1.31 KB

Versions: 18

Compression:

Stored size: 1.31 KB

Contents

require 'spec_helper'

module Logical
  module Naf

    describe MachineRunner do

    	let!(:machine_runner1) { FactoryGirl.create(:machine_runner) }
      let!(:machine_runner2) { FactoryGirl.create(:machine_runner) }
    	let!(:machine) { ::Logical::Naf::Machine.new(machine_runner1.machine) }
    	let!(:invocation1) { FactoryGirl.create(:machine_runner_invocation, machine_runner: machine_runner1) }
    	let!(:invocation2) { FactoryGirl.create(:machine_runner_invocation, machine_runner: machine_runner2) }
    	let!(:invocations) {
    		[[machine_runner1.id,
          machine_runner1.created_at.to_s,
          machine.id,
          machine_runner1.runner_cwd,
          invocation1.id,
          invocation1.pid,
          invocation1.status.gsub('-', ' ').split.map(&:capitalize).join(' '),
          0,
          ''],
         [machine_runner2.id,
          machine_runner2.created_at.to_s,
          machine.id,
          machine_runner2.runner_cwd,
          invocation2.id,
          invocation2.pid,
          invocation2.status.gsub('-', ' ').split.map(&:capitalize).join(' '),
          0,
          '']]
    	}

    	describe '#to_array' do
    		it 'return invocation information in correct order' do
    			::Logical::Naf::MachineRunner.to_array(0, 'asc').should == invocations
    		end
    	end

    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
naf-2.1.13 spec/models/logical/naf/machine_runner_spec.rb
naf-2.1.12 spec/models/logical/naf/machine_runner_spec.rb
naf-2.1.11 spec/models/logical/naf/machine_runner_spec.rb
naf-2.1.10 spec/models/logical/naf/machine_runner_spec.rb
naf-2.1.9 spec/models/logical/naf/machine_runner_spec.rb
naf-2.1.8 spec/models/logical/naf/machine_runner_spec.rb
naf-2.1.6 spec/models/logical/naf/machine_runner_spec.rb
naf-2.1.5 spec/models/logical/naf/machine_runner_spec.rb
naf-2.1.4 spec/models/logical/naf/machine_runner_spec.rb
naf-2.1.3 spec/models/logical/naf/machine_runner_spec.rb
naf-2.1.2 spec/models/logical/naf/machine_runner_spec.rb
naf-2.1.1 spec/models/logical/naf/machine_runner_spec.rb
naf-2.1.0 spec/models/logical/naf/machine_runner_spec.rb
naf-2.0.4 spec/models/logical/naf/machine_runner_spec.rb
naf-2.0.3 spec/models/logical/naf/machine_runner_spec.rb
naf-2.0.2 spec/models/logical/naf/machine_runner_spec.rb
naf-2.0.1 spec/models/logical/naf/machine_runner_spec.rb
naf-2.0.0 spec/models/logical/naf/machine_runner_spec.rb