spec/unit/robots_spec.rb in robot-controller-2.0.2 vs spec/unit/robots_spec.rb in robot-controller-2.0.3

- old
+ new

@@ -50,9 +50,23 @@ { robot: 'O', queues: ['O_C'], n: 3 } ] end end + context 'multi' do + subject do + RobotController::Parser.load('multi.yml', 'spec/fixtures', 'host1') + end + + it 'parses correctly' do + expect(subject).to eq [ + { robot: 'X', queues: %w(X_default), n: 1 }, + { robot: 'X', queues: %w(X_A X_B X_C), n: 1 }, + { robot: 'X', queues: %w(X_D), n: 3 } + ] + end + end + context 'file-not-found' do it 'reports error' do expect do RobotController::Parser.load('nofile.yml', 'spec/fixtures', 'host3') end.to raise_error(RuntimeError)