Skip to content

Commit

Permalink
Revert "auto correct spec file"
Browse files Browse the repository at this point in the history
This reverts commit 2e59db2.
  • Loading branch information
Philippe Beaumont committed Apr 30, 2022
1 parent 2e59db2 commit 3258fed
Show file tree
Hide file tree
Showing 17 changed files with 11 additions and 50 deletions.
3 changes: 0 additions & 3 deletions spec/acceptance/php_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require 'spec_helper_acceptance'

describe 'php with default settings' do
Expand Down Expand Up @@ -32,7 +30,6 @@
it { is_expected.to be_enabled }
end
end

context 'default parameters with extensions' do
case default[:platform]
when %r{ubuntu-20.04}, %r{ubuntu-18.04}
Expand Down
2 changes: 0 additions & 2 deletions spec/classes/php_composer_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'php::composer', type: :class do
Expand Down
3 changes: 0 additions & 3 deletions spec/classes/php_fpm_config_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require 'rspec'
require 'spec_helper'

Expand All @@ -15,7 +13,6 @@
it { is_expected.to contain_class('php::globals') }
it { is_expected.to contain_class('php::params') }
end

describe 'creates config file' do
let(:params) do
{
Expand Down
2 changes: 0 additions & 2 deletions spec/classes/php_fpm_service_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'php::fpm::service', type: :class do
Expand Down
2 changes: 0 additions & 2 deletions spec/classes/php_fpm_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'php::fpm', type: :class do
Expand Down
3 changes: 0 additions & 3 deletions spec/classes/php_repo_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'php::repo', type: :class do
Expand All @@ -20,7 +18,6 @@
it { is_expected.to compile.with_all_deps }
end
end

describe 'when configuring a package repo' do
case facts[:osfamily]
when 'Debian'
Expand Down
2 changes: 0 additions & 2 deletions spec/classes/php_repo_ubuntu_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'php::repo::ubuntu', type: :class do
Expand Down
6 changes: 1 addition & 5 deletions spec/classes/php_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'php', type: :class do
Expand Down Expand Up @@ -72,7 +70,6 @@
describe 'works without params' do
it { is_expected.to compile.with_all_deps }
end

describe 'when called with no parameters' do
case facts[:osfamily]
when 'Suse', 'RedHat', 'CentOS'
Expand Down Expand Up @@ -201,7 +198,6 @@

it { is_expected.to contain_file(dstfile).with_content(%r{user = nginx}) }
end

describe 'when called with fpm_group parameter' do
let(:params) { { fpm_group: 'nginx' } }

Expand Down Expand Up @@ -299,7 +295,7 @@
describe 'when called with cli_settings parameter' do
let(:params) do
{
'settings' => { 'PHP/memory_limit' => '300M' },
'settings' => { 'PHP/memory_limit' => '300M' },
'cli_settings' => { 'PHP/memory_limit' => '1000M' }
}
end
Expand Down
2 changes: 0 additions & 2 deletions spec/defines/config_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'php::config' do
Expand Down
2 changes: 0 additions & 2 deletions spec/defines/extension_rhscl_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'php::extension' do
Expand Down
14 changes: 5 additions & 9 deletions spec/defines/extension_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'php::extension' do
Expand Down Expand Up @@ -48,13 +46,12 @@
end

it { is_expected.to contain_package('php5-json') }

it do
is_expected.to contain_php__config('json').with(
file: "#{etcdir}/json.ini",
config: {
'extension' => 'json.so',
'test' => 'foo'
'test' => 'foo'
}
)
end
Expand All @@ -77,7 +74,7 @@
require: nil,
config: {
'extension' => 'json.so',
'test' => 'foo'
'test' => 'foo'
}
)
end
Expand Down Expand Up @@ -121,7 +118,7 @@
is_expected.to contain_php__config('json').with(
config: {
'extension' => 'json.so',
'bar.test' => 'foo'
'bar.test' => 'foo'
}
)
end
Expand Down Expand Up @@ -214,7 +211,7 @@

it { is_expected.to contain_php__config('xdebug').with_file("#{etcdir}/xdebug.ini") }

# NOTE: to consider: As of PHP 5.2.0, the JSON extension is bundled and compiled into PHP by default
# note to consider: As of PHP 5.2.0, the JSON extension is bundled and compiled into PHP by default
# http://php.net/manual/en/json.installation.php
context 'pecl installation' do
let(:title) { 'json' }
Expand All @@ -232,13 +229,12 @@
it { is_expected.to contain_package('json') }
it { is_expected.to contain_package('libmemcached-dev') }
it { is_expected.to contain_package('build-essential') }

it do
is_expected.to contain_php__config('json').with(
file: "#{etcdir}/nice_name.ini",
config: {
'extension' => 'nice_name.so',
'test' => 'foo'
'test' => 'foo'
}
)
end
Expand Down
2 changes: 0 additions & 2 deletions spec/defines/fpm_pool_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'php::fpm::pool' do
Expand Down
2 changes: 0 additions & 2 deletions spec/functions/to_hash_settings_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'to_hash_settings' do
Expand Down
10 changes: 5 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# frozen_string_literal: true

# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

# puppetlabs_spec_helper will set up coverage if the env variable is set.
# We want to do this if lib exists and it hasn't been explicitly set.
ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../lib', __dir__))
ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../../lib', __FILE__))

require 'voxpupuli/test/spec_helper'

if File.exist?(File.join(__dir__, 'default_module_facts.yml'))
facts = YAML.safe_load(File.read(File.join(__dir__, 'default_module_facts.yml')))
facts&.each do |name, value|
add_custom_fact name.to_sym, value
if facts
facts.each do |name, value|
add_custom_fact name.to_sym, value
end
end
end
2 changes: 0 additions & 2 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

Expand Down
2 changes: 0 additions & 2 deletions spec/unit/provider/package/pear_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require 'spec_helper'

describe Puppet::Type.type(:package).provider(:pear) do
Expand Down
2 changes: 0 additions & 2 deletions spec/unit/provider/package/pecl_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require 'spec_helper'

describe Puppet::Type.type(:package).provider(:pecl) do
Expand Down

0 comments on commit 3258fed

Please sign in to comment.