Skip to content

Commit

Permalink
Remove cache_data helper methods
Browse files Browse the repository at this point in the history
These do not appear to be needed anymore. Removing this simplifies the
code.
  • Loading branch information
ekohl committed Jul 24, 2020
1 parent d49ce83 commit 260859c
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 25 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ Puppetfile.lock
.*.sw?
.yardoc/
Guardfile
spec/fixtures/tmpdir/
5 changes: 0 additions & 5 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
---
.travis.yml:
secure: "IkrfAnec7ovZLMvhvXt8ZihyYdAJTC/nm7KDm4u2G/uD2NGaMdHNOAenkwIwC1vfCzHKcgC5u/lAYFrYvHpQpJW0kHLKnk1SpndfWX9kd5SlDDzEP5mJGjMZeTY6H9sV5fsB6Pt7l/sw5ACL/0bFDl0mYBnVhGv6UxZZ5xMQIUw="
spec/spec_helper.rb:
spec_overrides: "require 'spec_helper_methods'"
.gitignore:
paths:
- spec/fixtures/tmpdir/
12 changes: 0 additions & 12 deletions spec/functions/extlib/cache_data_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
let(:initial_data) { 'original_password' }
let(:data_name) { 'mysql_password' }
let(:namespace) { 'data_cache' }
let(:vardir) { "#{FIXTURES_PATH}/tmpdir" }

it { expect(subject).not_to eq(nil) }
it { is_expected.not_to eq(nil) }
Expand All @@ -13,17 +12,6 @@
it { is_expected.to run.with_params('', 'mysql_password', initial_data).and_raise_error(ArgumentError) }

describe 'data caching' do
before do
# Fool rspec-puppet into creating a consistent vardir for these tests!
allow(Dir).to receive(:mktmpdir).and_return("#{FIXTURES_PATH}/tmpdir")
# Stop rspec-puppet from blowing away the vardir between each example. Is unstubbed in the after block.
allow(FileUtils).to receive(:rm_rf).with(vardir).and_return(true)
end
after do
# Since rspec-puppet won't be removing the vardir, we'd better do that ourselves.
FileUtils.rm_rf(vardir) if File.directory?(vardir)
end

context 'when not in cache' do
it 'returns supplied data' do
is_expected.to run.with_params(namespace, data_name, initial_data).and_return(initial_data)
Expand Down
2 changes: 0 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@
end
end
end

require 'spec_helper_methods'
5 changes: 0 additions & 5 deletions spec/spec_helper_methods.rb

This file was deleted.

0 comments on commit 260859c

Please sign in to comment.