Sha256: 623cf7f016968436ebcdcc7ef01b16f8a58a30b8583a8f427b23acebd010cc8f
Contents?: true
Size: 653 Bytes
Versions: 3
Compression:
Stored size: 653 Bytes
Contents
require 'spec_helper' module Falcore describe Node::Slave do let(:master) { Node::Master.new('displayName' => 'master') } subject { Node::Slave.new(master, 'displayName' => 'slave') } describe '#initialize' do it 'requires a master as the first parameter' do expect { Node::Slave.new(foo: 'bar') }.to raise_error(ArgumentError) end it 'saves the master to an instance variable' do expect(subject.master).to be(master) end it 'adds the itself to the master slave collection' do subject expect(master.slaves).to include(subject) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
falcore-0.2.0 | spec/unit/nodes/slave_spec.rb |
falcore-0.1.1 | spec/unit/nodes/slave_spec.rb |
falcore-0.1.0 | spec/unit/nodes/slave_spec.rb |