Skip to content

Commit

Permalink
lint unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
southalc committed Feb 27, 2021
1 parent a169fb0 commit 9f6222e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
15 changes: 9 additions & 6 deletions spec/defines/binary_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@

describe 'types::binary' do
let(:title) { '/tmp/binary_spec.tmp' }
let(:params) {{
:properties => {
:ensure => 'file',
:content => 'VHlwZXMgdW5pdCB0ZXN0Cg=='
let(:params) do
{
properties: {
ensure: 'file',
content: 'VHlwZXMgdW5pdCB0ZXN0Cg==',
},
}
}}
end

on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }
if os.match(%r{windows}i)

if os =~ %r{windows}i
let(:title) { 'C:\\Temp\\binary_spec.tmp' }
else
let(:title) { '/tmp/binary_spec.tmp' }
Expand Down
15 changes: 9 additions & 6 deletions spec/defines/type_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

describe 'types::type' do
let(:title) { 'notify' }
let(:params) {{
:hash => {
:unit_test => {
:message => 'Unit test'
}
let(:params) do
{
hash: {
unit_test: {
message: 'Unit test',
},
},
}
}}
end

on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }
Expand Down

0 comments on commit 9f6222e

Please sign in to comment.