spec/lib/moblues/cli_spec.rb in moblues-0.1.0 vs spec/lib/moblues/cli_spec.rb in moblues-0.2.0

- old
+ new

@@ -26,13 +26,23 @@ end context 'when options given' do let(:options) { %w{--model=model/path --human=human/path --machine=machine/path} } - it 'created the directories reads the model and generates the files' do - expect(Moblues).to receive(:generate).with('model/path', 'human/path', 'machine/path').once + it 'uses Moblues and defaults to objc' do + expect(Moblues).to receive(:generate).with('model/path', 'human/path', 'machine/path', :objc).once perform + end + + context 'when using lang option' do + let(:options) { %w{--model=model/path --human=human/path --machine=machine/path --lang=swift} } + + it 'uses Moblues' do + expect(Moblues).to receive(:generate).with('model/path', 'human/path', 'machine/path', :swift).once + + perform + end end end end end