Sha256: 331d3d8070736c0bb806246b07b7f915a70145be8ed1cefa2abd035bec21872e
Contents?: true
Size: 1.06 KB
Versions: 6
Compression:
Stored size: 1.06 KB
Contents
require 'spec_helper' describe Mulder::Client do describe '.initialize' do let(:mocked_connection) { mock } it 'stores the app' do described_class.new(mocked_connection, 'foo', 'bar', 'worker').app.should == 'foo' end it 'stores the environment' do described_class.new(mocked_connection, 'foo', 'bar', 'worker').environment.should == 'bar' end end describe '#group' do it 'finds the correct group based on the given attributes' do mocked_connection = mock mocked_connection.expects(:group_by_id_regexp).with(/^foo-bar-WorkerGroup-.*$/i) client = described_class.new(mocked_connection, 'foo', 'bar', 'WorkerGroup') client.group end end describe '#instances' do it 'finds the instances for the group' do mocked_connection = mock mocked_group = mock mocked_connection.expects(:instances_by_group).with(mocked_group) client = described_class.new(mocked_connection, 'foo', 'bar', 'worker') client.expects(:group).returns(mocked_group) client.instances end end end
Version data entries
6 entries across 6 versions & 1 rubygems