Sha256: 2d0cb3c97771f7c7393860230a8a46b088cabee1b71a7a511919d64a86dad16d

Contents?: true

Size: 762 Bytes

Versions: 38

Compression:

Stored size: 762 Bytes

Contents

require "pathname"
require "tmpdir"

require File.expand_path("../../../../base", __FILE__)

describe Vagrant::Action::Builtin::Message do
  let(:app) { lambda { |env| } }
  let(:env) { { ui: ui } }

  let(:ui)  { double("ui") }

  describe "#call" do
    it "outputs the given message" do
      subject = described_class.new(app, env, "foo")

      expect(ui).to receive(:output).with("foo").ordered
      expect(app).to receive(:call).with(env).ordered

      subject.call(env)
    end

    it "outputs the given message after the call" do
      subject = described_class.new(app, env, "foo", post: true)

      expect(app).to receive(:call).with(env).ordered
      expect(ui).to receive(:output).with("foo").ordered

      subject.call(env)
    end
  end
end

Version data entries

38 entries across 31 versions & 7 rubygems

Version Path
vagrant-aws-mkubenka-0.7.2.pre.24 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-22795b161bf6/test/unit/vagrant/action/builtin/message_test.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/test/unit/vagrant/action/builtin/message_test.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/test/unit/vagrant/action/builtin/message_test.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/test/unit/vagrant/action/builtin/message_test.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/test/unit/vagrant/action/builtin/message_test.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/test/unit/vagrant/action/builtin/message_test.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/test/unit/vagrant/action/builtin/message_test.rb
vagrant-aws-detiber-0.7.2.pre.4 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/test/unit/vagrant/action/builtin/message_test.rb
vagrant-aws-detiber-0.7.2.pre.3 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/test/unit/vagrant/action/builtin/message_test.rb
vagrant-aws-detiber-0.7.2.pre.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/test/unit/vagrant/action/builtin/message_test.rb
vagrant-unbundled-2.0.2.0 test/unit/vagrant/action/builtin/message_test.rb
vagrant-unbundled-2.0.1.0 test/unit/vagrant/action/builtin/message_test.rb
vagrant-aws-mkubenka-0.7.2.pre.22 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-f3fdbf414272/test/unit/vagrant/action/builtin/message_test.rb
vagrant-aws-mkubenka-0.7.2.pre.16 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-1ee58c40e3f5/test/unit/vagrant/action/builtin/message_test.rb
vagrant-unbundled-2.0.0.1 test/unit/vagrant/action/builtin/message_test.rb
vagrant-unbundled-1.9.8.1 test/unit/vagrant/action/builtin/message_test.rb
vagrant-unbundled-1.9.7.1 test/unit/vagrant/action/builtin/message_test.rb
vagrant-aws-mkubenka-0.7.2.pre.14 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/test/unit/vagrant/action/builtin/message_test.rb
vagrant-aws-mkubenka-0.7.2.pre.11 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/test/unit/vagrant/action/builtin/message_test.rb
vagrant-aws-mkubenka-0.7.2.pre.10 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/test/unit/vagrant/action/builtin/message_test.rb