Skip to content

Commit

Permalink
Merge pull request redhat-openstack#242 from bogdando/fix_MODULES_1416
Browse files Browse the repository at this point in the history
Fix missing 'should' in rspecs
  • Loading branch information
hunner committed Oct 15, 2014
2 parents cbda1ce + f46ad77 commit 42667aa
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions spec/classes/rabbitmq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
describe 'apt::source default values' do
let(:facts) {{ :osfamily => 'Debian' }}
it 'should add a repo with defaults values' do
contain_file('/etc/apt/sources.list.d/rabbitmq.list')\
should contain_file('/etc/apt/sources.list.d/rabbitmq.list')\
.with_content(%r|deb http\://www\.rabbitmq.com/debian/ testing main|)
end
end
Expand All @@ -31,7 +31,7 @@
:repos => 'main'
}}
it 'should add a repo with custom new values' do
contain_file('/etc/apt/sources.list.d/rabbitmq.list')\
should contain_file('/etc/apt/sources.list.d/rabbitmq.list')\
.with_content(%r|deb http\://www\.foorepo.com/debian/ unstable main|)
end
end
Expand Down Expand Up @@ -235,31 +235,31 @@
describe 'node_ip_address when set' do
let(:params) {{ :node_ip_address => '172.0.0.1' }}
it 'should set RABBITMQ_NODE_IP_ADDRESS to specified value' do
contain_file('rabbitmq-env.config').with({
should contain_file('rabbitmq-env.config').with({
'content' => 'RABBITMQ_NODE_IP_ADDRESS=172.0.0.1',
})
end
end

describe 'stomp by default' do
it 'should not specify stomp parameters in rabbitmq.config' do
contain_file('rabbitmq.config').without({
should contain_file('rabbitmq.config').without({
'content' => /stomp/,})
end
end
describe 'stomp when set' do
let(:params) {{ :config_stomp => true, :stomp_port => 5679 }}
it 'should specify stomp port in rabbitmq.config' do
contain_file('rabbitmq.config').with({
'content' => /rabbitmq_stomp.*tcp_listeners, \[5679\]/,
should contain_file('rabbitmq.config').with({
'content' => /rabbitmq_stomp.*tcp_listeners, \[5679\]/m,
})
end
end
describe 'stomp when set with ssl' do
let(:params) {{ :config_stomp => true, :stomp_port => 5679, :ssl_stomp_port => 5680 }}
it 'should specify stomp port and ssl stomp port in rabbitmq.config' do
contain_file('rabbitmq.config').with({
'content' => /rabbitmq_stomp.*tcp_listeners, \[5679\].*ssl_listeners, \[5680\]/,
should contain_file('rabbitmq.config').with({
'content' => /rabbitmq_stomp.*tcp_listeners, \[5679\].*ssl_listeners, \[5680\]/m,
})
end
end
Expand Down Expand Up @@ -316,8 +316,8 @@
describe 'default_user and default_pass set' do
let(:params) {{ :default_user => 'foo', :default_pass => 'bar' }}
it 'should set default_user and default_pass to specified values' do
contain_file('rabbitmq.config').with({
'content' => /default_user, <<"foo">>.*default_pass, <<"bar">>/,
should contain_file('rabbitmq.config').with({
'content' => /default_user, <<"foo">>.*default_pass, <<"bar">>/m,
})
end
end
Expand All @@ -332,7 +332,7 @@
} }

it 'should set ssl options to specified values' do
contain_file('rabbitmq.config').with({
should contain_file('rabbitmq.config').with({
'content' => %r|ssl_listeners, \[3141\].*
ssl_options, \[\{cacertfile,"/path/to/cacert".*
certfile="/path/to/cert".*
Expand All @@ -352,7 +352,7 @@
} }

it 'should set ssl options to specified values' do
contain_file('rabbitmq.config').with({
should contain_file('rabbitmq.config').with({
'content' => %r|tcp_listeners, \[\].*
ssl_listeners, \[3141\].*
ssl_options, \[\{cacertfile,"/path/to/cacert".*
Expand All @@ -373,7 +373,7 @@
} }

it 'should set rabbitmq_management ssl options to specified values' do
contain_file('rabbitmq.config').with({
should contain_file('rabbitmq.config').with({
'content' => %r|\{rabbitmq_management, \[.*
\{listener, \[.*
\{port, 3141\},.*
Expand All @@ -394,11 +394,11 @@
} }

it 'should set rabbitmq_management options to specified values' do
contain_file('rabbitmq.config').with({
should contain_file('rabbitmq.config').with({
'content' => /\{rabbitmq_management, \[.*
\{listener, \[.*
\{port, 3141\},.*
\]\}/,
\]\}/m,
})
end
end
Expand All @@ -414,7 +414,7 @@
} }

it 'should set rabbitmq_management ssl options to specified values' do
contain_file('rabbitmq.config').with({
should contain_file('rabbitmq.config').with({
'content' => %r|\{rabbitmq_management, \[.*
\{listener, \[.*
\{port, 3141\},.*
Expand All @@ -435,11 +435,11 @@
} }

it 'should set rabbitmq_management options to specified values' do
contain_file('rabbitmq.config').with({
should contain_file('rabbitmq.config').with({
'content' => /\{rabbitmq_management, \[.*
\{listener, \[.*
\{port, 3141\},.*
\]\}/,
\]\}/m,
})
end
end
Expand Down

0 comments on commit 42667aa

Please sign in to comment.