Sha256: 0c42be158bdd0b447c7f7cf99d9ef5f799eb610d462178b5fe5618e17651dddf

Contents?: true

Size: 721 Bytes

Versions: 8

Compression:

Stored size: 721 Bytes

Contents

require 'vagrant-deltacloud-provider/spec_helper'

describe VagrantPlugins::Deltacloud::Action::Message do

  let(:ui) do
    double('ui').tap do |ui|
      ui.stub(:info).with(anything)
      ui.stub(:error).with(anything)
    end
  end

  let(:env) do
    Hash.new.tap do |env|
      env[:ui] = ui
    end
  end

  let(:app) do
    double('app').tap do |app|
      app.stub(:call).with(anything)
    end
  end

  describe 'call' do
    context 'when message is given' do
      it 'print out the message' do
        expect(ui).to receive(:info).with('Message to show')
        expect(app).to receive(:call)
        @action = Message.new(app, nil, 'Message to show')
        @action.call(env)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
vagrant-deltacloud-provider-0.0.9 spec/vagrant-deltacloud-provider/action/message_spec.rb
vagrant-deltacloud-provider-0.0.8 spec/vagrant-deltacloud-provider/action/message_spec.rb
vagrant-deltacloud-provider-0.0.7 spec/vagrant-deltacloud-provider/action/message_spec.rb
vagrant-deltacloud-provider-0.0.6 spec/vagrant-deltacloud-provider/action/message_spec.rb
vagrant-deltacloud-provider-0.0.5 spec/vagrant-deltacloud-provider/action/message_spec.rb
vagrant-deltacloud-provider-0.0.4 spec/vagrant-deltacloud-provider/action/message_spec.rb
vagrant-deltacloud-provider-0.0.3 spec/vagrant-deltacloud-provider/action/message_spec.rb
vagrant-deltacloud-provider-0.0.2 spec/vagrant-deltacloud-provider/action/message_spec.rb