Sha256: 9c7cf6b1242bb7dc19ebe4f39ec6a6ccd733f18714ba3fb88c1e67ff2ba1fa4b

Contents?: true

Size: 1.2 KB

Versions: 20

Compression:

Stored size: 1.2 KB

Contents

require "spec_helper"
require "capistrano/doctor/environment_doctor"

module Capistrano
  module Doctor
    describe EnvironmentDoctor do
      let(:doc) { EnvironmentDoctor.new }

      it "prints using 4-space indentation" do
        expect { doc.call }.to output(/^ {4}/).to_stdout
      end

      it "prints the Ruby version" do
        expect { doc.call }.to\
          output(/#{Regexp.quote(RUBY_DESCRIPTION)}/).to_stdout
      end

      it "prints the Rubygems version" do
        expect { doc.call }.to output(/#{Regexp.quote(Gem::VERSION)}/).to_stdout
      end

      describe "Rake" do
        before do
          load File.expand_path("../../../../../lib/capistrano/doctor.rb",
                                __FILE__)
        end

        after do
          Rake::Task.clear
        end

        it "has an doctor:environment task that calls EnvironmentDoctor", capture_io: true do
          EnvironmentDoctor.any_instance.expects(:call)
          Rake::Task["doctor:environment"].invoke
        end

        it "has a doctor task that depends on doctor:environment" do
          expect(Rake::Task["doctor"].prerequisites).to \
            include("doctor:environment")
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
capistrano-3.19.2 spec/lib/capistrano/doctor/environment_doctor_spec.rb
capistrano-3.19.1 spec/lib/capistrano/doctor/environment_doctor_spec.rb
capistrano-3.19.0 spec/lib/capistrano/doctor/environment_doctor_spec.rb
capistrano-3.18.1 spec/lib/capistrano/doctor/environment_doctor_spec.rb
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/capistrano-3.18.0/spec/lib/capistrano/doctor/environment_doctor_spec.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/capistrano-3.18.0/spec/lib/capistrano/doctor/environment_doctor_spec.rb
capistrano-3.18.0 spec/lib/capistrano/doctor/environment_doctor_spec.rb
capistrano-3.17.3 spec/lib/capistrano/doctor/environment_doctor_spec.rb
capistrano-3.17.2 spec/lib/capistrano/doctor/environment_doctor_spec.rb
capistrano-3.17.1 spec/lib/capistrano/doctor/environment_doctor_spec.rb
capistrano-3.17.0 spec/lib/capistrano/doctor/environment_doctor_spec.rb
capistrano-3.16.0 spec/lib/capistrano/doctor/environment_doctor_spec.rb
capistrano-3.15.0 spec/lib/capistrano/doctor/environment_doctor_spec.rb
capistrano-3.14.1 spec/lib/capistrano/doctor/environment_doctor_spec.rb
capistrano-3.14.0 spec/lib/capistrano/doctor/environment_doctor_spec.rb
capistrano-3.13.0 spec/lib/capistrano/doctor/environment_doctor_spec.rb
capistrano-3.12.1 spec/lib/capistrano/doctor/environment_doctor_spec.rb
capistrano-3.12.0 spec/lib/capistrano/doctor/environment_doctor_spec.rb
capistrano-3.11.2 spec/lib/capistrano/doctor/environment_doctor_spec.rb
capistrano-3.11.1 spec/lib/capistrano/doctor/environment_doctor_spec.rb