Skip to content

Commit

Permalink
Convert specs to RSpec 3.0.0 syntax with Transpec
Browse files Browse the repository at this point in the history
This conversion is done by Transpec 2.2.1 with the following command:
    transpec spec/defines

* 65 conversions
    from: it { should ... }
      to: it { is_expected.to ... }

* 9 conversions
    from: it { should_not ... }
      to: it { is_expected.not_to ... }

For more details: https://github.com/yujinakayama/transpec#supported-conversions
  • Loading branch information
Ashley Penney committed Jun 6, 2014
1 parent 815f5cd commit 9f97fc7
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 74 deletions.
18 changes: 9 additions & 9 deletions spec/defines/mod_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
let :title do
'spec_m'
end
it { should contain_class("apache::params") }
it { is_expected.to contain_class("apache::params") }
it "should manage the module load file" do
should contain_file('spec_m.load').with({
is_expected.to contain_file('spec_m.load').with({
:path => '/etc/httpd/conf.d/spec_m.load',
:content => "LoadModule spec_m_module modules/mod_spec_m.so\n",
:owner => 'root',
Expand All @@ -41,8 +41,8 @@
# parameters
let(:params) { {:package => 'mod_xsendfile'} }

it { should contain_class("apache::params") }
it { should contain_package('mod_xsendfile') }
it { is_expected.to contain_class("apache::params") }
it { is_expected.to contain_package('mod_xsendfile') }
end
end

Expand All @@ -64,9 +64,9 @@
let :title do
'spec_m'
end
it { should contain_class("apache::params") }
it { is_expected.to contain_class("apache::params") }
it "should manage the module load file" do
should contain_file('spec_m.load').with({
is_expected.to contain_file('spec_m.load').with({
:path => '/etc/apache2/mods-available/spec_m.load',
:content => "LoadModule spec_m_module /usr/lib/apache2/modules/mod_spec_m.so\n",
:owner => 'root',
Expand All @@ -75,7 +75,7 @@
} )
end
it "should link the module load file" do
should contain_file('spec_m.load symlink').with({
is_expected.to contain_file('spec_m.load symlink').with({
:path => '/etc/apache2/mods-enabled/spec_m.load',
:target => '/etc/apache2/mods-available/spec_m.load',
:owner => 'root',
Expand Down Expand Up @@ -103,9 +103,9 @@
let :title do
'spec_m'
end
it { should contain_class("apache::params") }
it { is_expected.to contain_class("apache::params") }
it "should manage the module load file" do
should contain_file('spec_m.load').with({
is_expected.to contain_file('spec_m.load').with({
:path => '/usr/local/etc/apache22/Modules/spec_m.load',
:content => "LoadModule spec_m_module /usr/local/libexec/apache22/mod_spec_m.so\n",
:owner => 'root',
Expand Down
Loading

0 comments on commit 9f97fc7

Please sign in to comment.