Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-7596

Remove redundant Rspec settings from spec_helper.rb

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • PUP 5.0.0
    • None
    • None
      • Code no longer exists in the spec_helper, but all tests still pass on Windows in AppVeyor and Jenkins CI
    • Agent
    • 1
    • Agent 2017-05-31
    • Not Needed
    • No Action

    Description

      As part of MODULES-4976 I was investigating the use of the following code snippet:

        if Puppet::Util::Platform.windows?
          config.output_stream = $stdout
          config.error_stream = $stderr
          config.formatters.each { |f| f.instance_variable_set(:@output, $stdout) }
        end
      

      I noticed that this still exists in Puppet at;
      https://github.com/puppetlabs/puppet/blob/master/spec/spec_helper.rb#L87-L96

      This code was originally to get around an issue with the win32_console gem back in the Ruby 1.x days.

      https://github.com/puppetlabs/puppet/commit/4ffc02d22093f0b76046a51eee603932a9b14f62
      and
      https://github.com/puppetlabs/puppet/commit/0babce626adb2e59bf212e4272b9e088a7b559a7

      As Puppet 3 is now end of life, Ruby 2.x no longer uses the win32_console gem, this code is no longer required to run specs on Windows correctly.

      This ticket is track removing this from the the spec_helper

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              glenn.sarti Glenn Sarti
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support