Sha256: 0ccbb4aaf79cd5644fe16296b77477b2495039eb575ab32bd0f986b9aed76cde
Contents?: true
Size: 634 Bytes
Versions: 4
Compression:
Stored size: 634 Bytes
Contents
require_relative '../lib/flexible_include' RSpec.describe(FlexibleInclude) do it 'controls access to files' do ENV['FLEXIBLE_INCLUDE_PATHS'] = '~/.*:spec/.*' described_class.send(:new, 'my_tag', '', Liquid::ParseContext.new) described_class.security_check expect(described_class.access_allowed(__FILE__)).to be_truthy expect(described_class.access_allowed('~/.mem_settings.yaml')).to be_truthy home_file = JekyllTagHelper.expand_env('$HOME/.mem_settings.yaml') expect(described_class.access_allowed(home_file)).to be_truthy expect(described_class.access_allowed('/asdf')).to be_falsey end end
Version data entries
4 entries across 4 versions & 1 rubygems