Sha256: e4b385f82bcc5d4806abbbc82d05fd6f0e1014ffe83551a3fafbf944dcdce343
Contents?: true
Size: 578 Bytes
Versions: 10
Compression:
Stored size: 578 Bytes
Contents
require 'spec_helper' describe Mulder::Formatter do describe '.initialize' do it 'raises an error of the format is not implemented' do expect { described_class.new([], 'foo') }.to raise_error(NotImplementedError, 'Formatting as foo has not been implemented!') end end describe "#output" do it 'sends the correct formatter the instances' do mock_instances = mock Mulder::Formats::Human.expects(:new).with(mock_instances).returns(mock(output: 'foo')) Mulder::Formatter.new(mock_instances, 'human').output end end end
Version data entries
10 entries across 10 versions & 1 rubygems