From 569e9276dbeea38f4920596502db75d64abbdc5e Mon Sep 17 00:00:00 2001 From: Felipe Zipitria Date: Wed, 30 Oct 2019 18:01:52 -0300 Subject: [PATCH] test(inspec): add test to check `.vimrc` file is generated properly --- test/integration/vimrc/controls/config_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/integration/vimrc/controls/config_spec.rb diff --git a/test/integration/vimrc/controls/config_spec.rb b/test/integration/vimrc/controls/config_spec.rb new file mode 100644 index 0000000..95f62c2 --- /dev/null +++ b/test/integration/vimrc/controls/config_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +control 'vimrc is managed' do + title 'formula should manage .vimrc' + + describe file('/home/vim_user/.vimrc') do + it { should be_owned_by 'vim_user' } + its('mode') { should cmp '0644' } + its('content') { should match(/syntax on/) } + end +end