repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/file_serving/terminus_selector_spec.rb
spec/unit/file_serving/terminus_selector_spec.rb
require 'spec_helper' require 'puppet/file_serving/terminus_selector' describe Puppet::FileServing::TerminusSelector do class TestSelector include Puppet::FileServing::TerminusSelector end def create_request(key) Puppet::Indirector::Request.new(:indirection_name, :find, key, nil, {node: 'whatever'}) ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/file_serving/mount_spec.rb
spec/unit/file_serving/mount_spec.rb
require 'spec_helper' require 'puppet/file_serving/mount' describe Puppet::FileServing::Mount do it "should use 'mount[$name]' as its string form" do expect(Puppet::FileServing::Mount.new("foo").to_s).to eq("mount[foo]") end end describe Puppet::FileServing::Mount, " when initializing" do it "should fail on...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/file_serving/configuration_spec.rb
spec/unit/file_serving/configuration_spec.rb
require 'spec_helper' require 'puppet/file_serving/configuration' describe Puppet::FileServing::Configuration do include PuppetSpec::Files before :each do @path = make_absolute("/path/to/configuration/file.conf") Puppet[:trace] = false Puppet[:fileserverconfig] = @path end after :each do Pup...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/file_serving/content_spec.rb
spec/unit/file_serving/content_spec.rb
require 'spec_helper' require 'puppet/file_serving/content' describe Puppet::FileServing::Content do let(:path) { File.expand_path('/path') } it "should be a subclass of Base" do expect(Puppet::FileServing::Content.superclass).to equal(Puppet::FileServing::Base) end it "should indirect file_content" do ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/file_serving/http_metadata_spec.rb
spec/unit/file_serving/http_metadata_spec.rb
require 'spec_helper' require 'puppet/file_serving/http_metadata' require 'matchers/json' require 'net/http' require 'digest' describe Puppet::FileServing::HttpMetadata do let(:foobar) { File.expand_path('/foo/bar') } it "should be a subclass of Metadata" do expect( described_class.superclass ).to be Puppet::...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/file_serving/terminus_helper_spec.rb
spec/unit/file_serving/terminus_helper_spec.rb
require 'spec_helper' require 'puppet/file_serving/terminus_helper' class Puppet::FileServing::TestHelper include Puppet::FileServing::TerminusHelper attr_reader :model def initialize(model) @model = model end end describe Puppet::FileServing::TerminusHelper do before do @model = double('model') ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/file_serving/base_spec.rb
spec/unit/file_serving/base_spec.rb
require 'spec_helper' require 'puppet/file_serving/base' describe Puppet::FileServing::Base do let(:path) { File.expand_path('/module/dir/file') } let(:file) { File.expand_path('/my/file') } it "should accept a path" do expect(Puppet::FileServing::Base.new(path).path).to eq(path) end it "should requir...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/file_serving/mount/file_spec.rb
spec/unit/file_serving/mount/file_spec.rb
require 'spec_helper' require 'puppet/file_serving/mount/file' module FileServingMountTesting def stub_facter(hostname) allow(Facter).to receive(:value).with("networking.hostname").and_return(hostname.sub(/\..+/, '')) allow(Facter).to receive(:value).with("networking.domain").and_return(hostname.sub(/^[^.]+\...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/file_serving/mount/modules_spec.rb
spec/unit/file_serving/mount/modules_spec.rb
require 'spec_helper' require 'puppet/file_serving/mount/modules' describe Puppet::FileServing::Mount::Modules do before do @mount = Puppet::FileServing::Mount::Modules.new("modules") @environment = double('environment', :module => nil) @request = double('request', :environment => @environment) end ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/file_serving/mount/pluginfacts_spec.rb
spec/unit/file_serving/mount/pluginfacts_spec.rb
require 'spec_helper' require 'puppet/file_serving/mount/pluginfacts' describe Puppet::FileServing::Mount::PluginFacts do before do @mount = Puppet::FileServing::Mount::PluginFacts.new("pluginfacts") @environment = double('environment', :module => nil) @options = { :recurse => true } @request = doub...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/file_serving/mount/tasks_spec.rb
spec/unit/file_serving/mount/tasks_spec.rb
require 'spec_helper' require 'puppet/file_serving/mount/tasks' describe Puppet::FileServing::Mount::Tasks do before do @mount = Puppet::FileServing::Mount::Tasks.new("tasks") @environment = double('environment', :module => nil) @request = double('request', :environment => @environment) end describ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/file_serving/mount/scripts_spec.rb
spec/unit/file_serving/mount/scripts_spec.rb
require 'spec_helper' require 'puppet/file_serving/mount/scripts' describe Puppet::FileServing::Mount::Scripts do before do @mount = Puppet::FileServing::Mount::Scripts.new("scripts") @environment = double('environment', :module => nil) @request = double('request', :environment => @environment) end ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/file_serving/mount/plugins_spec.rb
spec/unit/file_serving/mount/plugins_spec.rb
require 'spec_helper' require 'puppet/file_serving/mount/plugins' describe Puppet::FileServing::Mount::Plugins do before do @mount = Puppet::FileServing::Mount::Plugins.new("plugins") @environment = double('environment', :module => nil) @options = { :recurse => true } @request = double('request', :e...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/file_serving/mount/locales_spec.rb
spec/unit/file_serving/mount/locales_spec.rb
require 'spec_helper' require 'puppet/file_serving/mount/locales' describe Puppet::FileServing::Mount::Locales do before do @mount = Puppet::FileServing::Mount::Locales.new("locales") @environment = double('environment', :module => nil) @options = { :recurse => true } @request = double('request', :e...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/file_serving/configuration/parser_spec.rb
spec/unit/file_serving/configuration/parser_spec.rb
require 'spec_helper' require 'puppet/file_serving/configuration/parser' module FSConfigurationParserTesting def write_config_file(content) # We want an array, but we actually want our carriage returns on all of it. File.open(@path, 'w') {|f| f.puts content} end end describe Puppet::FileServing::Configu...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/hiera/scope_spec.rb
spec/unit/hiera/scope_spec.rb
require 'spec_helper' require 'hiera/scope' require 'puppet_spec/scope' describe Hiera::Scope do include PuppetSpec::Scope let(:real) { create_test_scope_for_node("test_node") } let(:scope) { Hiera::Scope.new(real) } describe "#initialize" do it "should store the supplied puppet scope" do expect(s...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/module_tool/metadata_spec.rb
spec/unit/module_tool/metadata_spec.rb
require 'spec_helper' require 'puppet/module_tool' describe Puppet::ModuleTool::Metadata do let(:data) { {} } let(:metadata) { Puppet::ModuleTool::Metadata.new } describe 'property lookups' do subject { metadata } %w[ name version author summary license source project_page issues_url dependencies d...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/module_tool/install_directory_spec.rb
spec/unit/module_tool/install_directory_spec.rb
require 'spec_helper' require 'puppet/module_tool/install_directory' describe Puppet::ModuleTool::InstallDirectory do def expect_normal_results results = installer.run expect(results[:installed_modules].length).to eq 1 expect(results[:installed_modules][0][:module]).to eq("pmtacceptance-stdlib") expe...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/module_tool/tar_spec.rb
spec/unit/module_tool/tar_spec.rb
require 'spec_helper' require 'puppet/module_tool/tar' describe Puppet::ModuleTool::Tar do [ { :name => 'ObscureLinuxDistro', :win => false }, { :name => 'Windows', :win => true } ].each do |os| it "always prefers minitar if it and zlib are present, even with tar available" do allow(Facter).to r...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/module_tool/application_spec.rb
spec/unit/module_tool/application_spec.rb
require 'spec_helper' require 'puppet/module_tool' describe Puppet::ModuleTool::Applications::Application do describe 'app' do good_versions = %w{ 1.2.4 0.0.1 0.0.0 0.0.2-git-8-g3d316d1 0.0.3-b1 10.100.10000 0.1.2-rc1 0.1.2-dev-1 0.1.2-svn12345 0.1.2-3 } bad_versions = %w{ 0.1 0 0.1...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/module_tool/installed_modules_spec.rb
spec/unit/module_tool/installed_modules_spec.rb
require 'spec_helper' require 'puppet/module_tool/installed_modules' require 'puppet_spec/modules' describe Puppet::ModuleTool::InstalledModules do include PuppetSpec::Files around do |example| dir = tmpdir("deep_path") FileUtils.mkdir_p(@modpath = File.join(dir, "modpath")) @env = Puppet::Node::Env...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/module_tool/tar/gnu_spec.rb
spec/unit/module_tool/tar/gnu_spec.rb
require 'spec_helper' require 'puppet/module_tool' describe Puppet::ModuleTool::Tar::Gnu, unless: Puppet::Util::Platform.windows? do let(:sourcedir) { '/space path/the/src/dir' } let(:sourcefile) { '/space path/the/module.tar.gz' } let(:destdir) { '/space path/the/dest/dir' } let(:destfile) { '/space pat...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/module_tool/tar/mini_spec.rb
spec/unit/module_tool/tar/mini_spec.rb
require 'spec_helper' require 'puppet/module_tool' describe Puppet::ModuleTool::Tar::Mini, :if => (Puppet.features.minitar? and Puppet.features.zlib?) do let(:sourcefile) { '/the/module.tar.gz' } let(:destdir) { File.expand_path '/the/dest/dir' } let(:sourcedir) { '/the/src/dir' } let(:destfile) { '/the/...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/module_tool/applications/checksummer_spec.rb
spec/unit/module_tool/applications/checksummer_spec.rb
require 'spec_helper' require 'puppet/module_tool/applications' require 'puppet_spec/files' require 'pathname' describe Puppet::ModuleTool::Applications::Checksummer do let(:tmpdir) do Pathname.new(PuppetSpec::Files.tmpdir('checksummer')) end let(:checksums) { Puppet::ModuleTool::Checksums.new(tmpdir).data ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/module_tool/applications/uninstaller_spec.rb
spec/unit/module_tool/applications/uninstaller_spec.rb
require 'spec_helper' require 'puppet/module_tool' require 'tmpdir' require 'puppet_spec/module_tool/shared_functions' require 'puppet_spec/module_tool/stub_source' describe Puppet::ModuleTool::Applications::Uninstaller do include PuppetSpec::ModuleTool::SharedFunctions include PuppetSpec::Files before do F...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/module_tool/applications/unpacker_spec.rb
spec/unit/module_tool/applications/unpacker_spec.rb
require 'spec_helper' require 'puppet/util/json' require 'puppet/module_tool/applications' require 'puppet/file_system' require 'puppet_spec/modules' describe Puppet::ModuleTool::Applications::Unpacker do include PuppetSpec::Files let(:target) { tmpdir("unpacker") } let(:module_name) { 'myusername-mytarba...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/module_tool/applications/installer_spec.rb
spec/unit/module_tool/applications/installer_spec.rb
require 'spec_helper' require 'puppet/module_tool/applications' require 'puppet_spec/module_tool/shared_functions' require 'puppet_spec/module_tool/stub_source' require 'tmpdir' describe Puppet::ModuleTool::Applications::Installer, :unless => RUBY_PLATFORM == 'java' do include PuppetSpec::ModuleTool::SharedFunction...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/module_tool/applications/upgrader_spec.rb
spec/unit/module_tool/applications/upgrader_spec.rb
require 'spec_helper' require 'puppet/module_tool/applications' require 'puppet_spec/module_tool/shared_functions' require 'puppet_spec/module_tool/stub_source' require 'tmpdir' describe Puppet::ModuleTool::Applications::Upgrader do include PuppetSpec::ModuleTool::SharedFunctions include PuppetSpec::Files befor...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/agent/disabler_spec.rb
spec/unit/agent/disabler_spec.rb
require 'spec_helper' require 'puppet/agent' require 'puppet/agent/locker' class DisablerTester include Puppet::Agent::Disabler end describe Puppet::Agent::Disabler do before do @disabler = DisablerTester.new end ## These tests are currently very implementation-specific, and they rely heavily on ## ha...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/agent/locker_spec.rb
spec/unit/agent/locker_spec.rb
require 'spec_helper' require 'puppet/agent' require 'puppet/agent/locker' class LockerTester include Puppet::Agent::Locker end describe Puppet::Agent::Locker do before do @locker = LockerTester.new end ## These tests are currently very implementation-specific, and they rely heavily on ## having acces...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/face/generate_spec.rb
spec/unit/face/generate_spec.rb
require 'spec_helper' require 'puppet_spec/files' require 'puppet/face' describe Puppet::Face[:generate, :current] do include PuppetSpec::Files let(:genface) { Puppet::Face[:generate, :current] } # * Format is 'pcore' by default # * Format is accepted as 'pcore' # * Any format expect 'pcore' is an error ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/face/epp_face_spec.rb
spec/unit/face/epp_face_spec.rb
require 'spec_helper' require 'puppet_spec/files' require 'puppet/face' describe Puppet::Face[:epp, :current] do include PuppetSpec::Files let(:eppface) { Puppet::Face[:epp, :current] } context "validate" do context "from an interactive terminal" do before :each do from_an_interactive_termin...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/face/facts_spec.rb
spec/unit/face/facts_spec.rb
require 'spec_helper' require 'puppet/face' require 'puppet/indirector/facts/facter' require 'puppet/indirector/facts/rest' describe Puppet::Face[:facts, '0.0.1'] do describe "#find" do it { is_expected.to be_action :find } end describe '#upload' do let(:model) { Puppet::Node::Facts } let(:test_data...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/face/plugin_spec.rb
spec/unit/face/plugin_spec.rb
require 'spec_helper' require 'puppet/face' describe Puppet::Face[:plugin, :current] do let(:pluginface) { described_class } let(:action) { pluginface.get_action(:download) } def render(result) action.when_rendering(:console).call(result) end context "download" do around do |example| Puppet.o...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/face/help_spec.rb
spec/unit/face/help_spec.rb
require 'spec_helper' require 'puppet/face' describe Puppet::Face[:help, '0.0.1'] do it 'has a help action' do expect(subject).to be_action :help end it 'has a default action of help' do expect(subject.get_action('help')).to be_default end it 'accepts a call with no arguments' do expect { ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/face/parser_spec.rb
spec/unit/face/parser_spec.rb
require 'spec_helper' require 'puppet_spec/files' require 'puppet/face' require 'puppet/application/parser' describe Puppet::Face[:parser, :current] do include PuppetSpec::Files let(:parser) { Puppet::Face[:parser, :current] } context "validate" do let(:validate_app) do Puppet::Application::Parser.n...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/face/config_spec.rb
spec/unit/face/config_spec.rb
require 'spec_helper' require 'puppet/face' describe Puppet::Face[:config, '0.0.1'] do let(:config) { described_class } def render(action, result) config.get_action(action).when_rendering(:console).call(result) end FS = Puppet::FileSystem it "prints a single setting without the name" do Puppet[:t...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/face/catalog_spec.rb
spec/unit/face/catalog_spec.rb
require 'spec_helper' require 'puppet/face' require 'puppet/indirector/facts/facter' require 'puppet/indirector/facts/rest' describe Puppet::Face[:catalog, '0.0.1'] do describe '#download' do let(:model) { Puppet::Node::Facts } let(:test_data) { model.new('puppet.node.test', {test_fact: 'catalog_face_reques...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/face/node_spec.rb
spec/unit/face/node_spec.rb
require 'spec_helper' require 'puppet/face' describe Puppet::Face[:node, '0.0.1'] do describe '#cleanup' do it "should clean everything" do { "cert" => ['hostname'], "cached_facts" => ['hostname'], "cached_node" => ['hostname'], "reports" => ['hostname'], ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/face/module/install_spec.rb
spec/unit/face/module/install_spec.rb
require 'spec_helper' require 'puppet/face' require 'puppet/module_tool' describe "puppet module install" do include PuppetSpec::Files describe "action" do let(:name) { double(:name) } let(:target_dir) { tmpdir('module install face action') } let(:options) { { :target_dir => target_dir } }...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/face/module/upgrade_spec.rb
spec/unit/face/module/upgrade_spec.rb
require 'spec_helper' require 'puppet/face' require 'puppet/module_tool' describe "puppet module upgrade" do subject { Puppet::Face[:module, :current] } let(:options) do {} end describe "inline documentation" do subject { Puppet::Face[:module, :current].get_action :upgrade } its(:summary) { ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/face/module/list_spec.rb
spec/unit/face/module/list_spec.rb
# encoding: UTF-8 require 'spec_helper' require 'puppet/face' require 'puppet/module_tool' require 'puppet_spec/modules' describe "puppet module list" do include PuppetSpec::Files around do |example| dir = tmpdir("deep_path") FileUtils.mkdir_p(@modpath1 = File.join(dir, "modpath1")) FileUtils.mkdir_...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/face/module/uninstall_spec.rb
spec/unit/face/module/uninstall_spec.rb
require 'spec_helper' require 'puppet/face' require 'puppet/module_tool' describe "puppet module uninstall" do include PuppetSpec::Files describe "action" do let(:name) { 'module-name' } let(:options) { Hash.new } it 'should invoke the Uninstaller app' do expect(Puppet::ModuleTool).to receiv...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/confine/exists_spec.rb
spec/unit/confine/exists_spec.rb
require 'spec_helper' require 'puppet/confine/exists' describe Puppet::Confine::Exists do before do @confine = Puppet::Confine::Exists.new("/my/file") @confine.label = "eh" end it "should be named :exists" do expect(Puppet::Confine::Exists.name).to eq(:exists) end it "should not pass if exis...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/confine/false_spec.rb
spec/unit/confine/false_spec.rb
require 'spec_helper' require 'puppet/confine/false' describe Puppet::Confine::False do it "should be named :false" do expect(Puppet::Confine::False.name).to eq(:false) end it "should require a value" do expect { Puppet::Confine.new }.to raise_error(ArgumentError) end describe "when passing in a l...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/confine/variable_spec.rb
spec/unit/confine/variable_spec.rb
require 'spec_helper' require 'puppet/confine/variable' describe Puppet::Confine::Variable do it "should be named :variable" do expect(Puppet::Confine::Variable.name).to eq(:variable) end it "should require a value" do expect { Puppet::Confine::Variable.new }.to raise_error(ArgumentError) end it "...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/confine/true_spec.rb
spec/unit/confine/true_spec.rb
require 'spec_helper' require 'puppet/confine/true' describe Puppet::Confine::True do it "should be named :true" do expect(Puppet::Confine::True.name).to eq(:true) end it "should require a value" do expect { Puppet::Confine::True.new }.to raise_error(ArgumentError) end describe "when passing in a ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/confine/feature_spec.rb
spec/unit/confine/feature_spec.rb
require 'spec_helper' require 'puppet/confine/feature' describe Puppet::Confine::Feature do it "should be named :feature" do expect(Puppet::Confine::Feature.name).to eq(:feature) end it "should require a value" do expect { Puppet::Confine::Feature.new }.to raise_error(ArgumentError) end it "should...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/relationship_spec.rb
spec/unit/parser/relationship_spec.rb
require 'spec_helper' require 'puppet/parser/relationship' describe Puppet::Parser::Relationship do before do @source = Puppet::Resource.new(:mytype, "source") @target = Puppet::Resource.new(:mytype, "target") @extra_resource = Puppet::Resource.new(:mytype, "extra") @extra_resource2 = Puppet::Resou...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/type_loader_spec.rb
spec/unit/parser/type_loader_spec.rb
require 'spec_helper' require 'puppet/parser/type_loader' require 'puppet/parser/parser_factory' require 'puppet_spec/modules' require 'puppet_spec/files' describe Puppet::Parser::TypeLoader do include PuppetSpec::Modules include PuppetSpec::Files let(:empty_hostclass) { Puppet::Parser::AST::Hostclass.new('') ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/templatewrapper_spec.rb
spec/unit/parser/templatewrapper_spec.rb
require 'spec_helper' require 'puppet/parser/templatewrapper' describe Puppet::Parser::TemplateWrapper do include PuppetSpec::Files let(:known_resource_types) { Puppet::Resource::TypeCollection.new("env") } let(:scope) do compiler = Puppet::Parser::Compiler.new(Puppet::Node.new("mynode")) allow(compiler...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/scope_spec.rb
spec/unit/parser/scope_spec.rb
require 'spec_helper' require 'puppet_spec/compiler' require 'puppet_spec/scope' describe Puppet::Parser::Scope do include PuppetSpec::Scope before :each do @scope = Puppet::Parser::Scope.new( Puppet::Parser::Compiler.new(Puppet::Node.new("foo")) ) @scope.source = Puppet::Resource::Type.new(:nod...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/files_spec.rb
spec/unit/parser/files_spec.rb
require 'spec_helper' require 'puppet/parser/files' describe Puppet::Parser::Files do include PuppetSpec::Files let(:modulepath) { tmpdir("modulepath") } let(:environment) { Puppet::Node::Environment.create(:testing, [modulepath]) } let(:mymod) { File.join(modulepath, "mymod") } let(:mymod_files) { File.jo...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions_spec.rb
spec/unit/parser/functions_spec.rb
require 'spec_helper' describe Puppet::Parser::Functions do def callable_functions_from(mod) Class.new { include mod }.new end let(:function_module) { Puppet::Parser::Functions.environment_module(Puppet.lookup(:current_environment)) } let(:environment) { Puppet::Node::Environment.create(:myenv, []) } ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/resource_spec.rb
spec/unit/parser/resource_spec.rb
require 'spec_helper' describe Puppet::Parser::Resource do before do environment = Puppet::Node::Environment.create(:testing, []) @node = Puppet::Node.new("yaynode", :environment => environment) @known_resource_types = environment.known_resource_types @compiler = Puppet::Parser::Compiler.new(@node) ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/compiler_spec.rb
spec/unit/parser/compiler_spec.rb
require 'spec_helper' require 'puppet_spec/compiler' require 'matchers/resource' class CompilerTestResource attr_accessor :builtin, :virtual, :evaluated, :type, :title def initialize(type, title) @type = type @title = title end def [](attr) return nil if (attr == :stage || attr == :alias) :ma...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
true
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/resource/param_spec.rb
spec/unit/parser/resource/param_spec.rb
require 'spec_helper' describe Puppet::Parser::Resource::Param do it "has readers for all of the attributes" do param = Puppet::Parser::Resource::Param.new(:name => 'myparam', :value => 'foo', :file => 'foo.pp', :line => 42) expect(param.name).to eq(:myparam) expect(param.value).to eq('foo') expect(...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/file_spec.rb
spec/unit/parser/functions/file_spec.rb
require 'spec_helper' require 'puppet_spec/files' describe "the 'file' function" do include PuppetSpec::Files let :node do Puppet::Node.new('localhost') end let :compiler do Puppet::Parser::Compiler.new(node) end let :scope do Puppet::Parser::Scope.new(compiler) end def with_file_content(content) ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/shellquote_spec.rb
spec/unit/parser/functions/shellquote_spec.rb
require 'spec_helper' describe "the shellquote function" do let :node do Puppet::Node.new('localhost') end let :compiler do Puppet::Parser::Compiler.new(node) end let :scope do Puppet::Parser::Scope.new(compiler) end it "should exist" do expect(Puppet::Parser::Functions.function("shellquote")).to e...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/sprintf_spec.rb
spec/unit/parser/functions/sprintf_spec.rb
require 'spec_helper' describe "the sprintf function" do before :each do node = Puppet::Node.new('localhost') compiler = Puppet::Parser::Compiler.new(node) @scope = Puppet::Parser::Scope.new(compiler) end it "should exist" do expect(Puppet::Parser::Functions.function("sprintf")).to eq("fun...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/generate_spec.rb
spec/unit/parser/functions/generate_spec.rb
require 'spec_helper' def with_executor return yield unless Puppet::Util::Platform.jruby? begin Puppet::Util::ExecutionStub.set do |command, options, stdin, stdout, stderr| require 'open3' # simulate what puppetserver does Dir.chdir(options[:cwd]) do out, err, _status = Open3.capture...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/hiera_spec.rb
spec/unit/parser/functions/hiera_spec.rb
require 'spec_helper' require 'puppet_spec/scope' describe 'Puppet::Parser::Functions#hiera' do include PuppetSpec::Scope let :scope do create_test_scope_for_node('foo') end it 'should raise an error since this function is converted to 4x API)' do expect { scope.function_hiera(['key']) }.to raise_error(Pup...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/fail_spec.rb
spec/unit/parser/functions/fail_spec.rb
require 'spec_helper' describe "the 'fail' parser function" do let :scope do node = Puppet::Node.new('localhost') compiler = Puppet::Parser::Compiler.new(node) scope = Puppet::Parser::Scope.new(compiler) allow(scope).to receive(:environment).and_return(nil) scope end it "should exist"...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/hiera_array_spec.rb
spec/unit/parser/functions/hiera_array_spec.rb
require 'spec_helper' require 'puppet_spec/scope' describe 'Puppet::Parser::Functions#hiera_array' do include PuppetSpec::Scope let :scope do create_test_scope_for_node('foo') end it 'should raise an error since this function is converted to 4x API)' do expect { scope.function_hiera_array(['key']) }.to rai...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/versioncmp_spec.rb
spec/unit/parser/functions/versioncmp_spec.rb
require 'spec_helper' describe "the versioncmp function" do before :each do node = Puppet::Node.new('localhost') compiler = Puppet::Parser::Compiler.new(node) @scope = Puppet::Parser::Scope.new(compiler) end it "should exist" do expect(Puppet::Parser::Functions.function("versioncmp")).to e...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/hiera_include_spec.rb
spec/unit/parser/functions/hiera_include_spec.rb
require 'spec_helper' require 'puppet_spec/scope' describe 'Puppet::Parser::Functions#hiera_include' do include PuppetSpec::Scope let :scope do create_test_scope_for_node('foo') end it 'should raise an error since this function is converted to 4x API)' do expect { scope.function_hiera_include(['key']) }.to...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/hiera_hash_spec.rb
spec/unit/parser/functions/hiera_hash_spec.rb
require 'spec_helper' require 'puppet_spec/scope' describe 'Puppet::Parser::Functions#hiera_hash' do include PuppetSpec::Scope let :scope do create_test_scope_for_node('foo') end it 'should raise an error since this function is converted to 4x API)' do expect { scope.function_hiera_hash(['key']) }.to raise...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/scanf_spec.rb
spec/unit/parser/functions/scanf_spec.rb
require 'spec_helper' describe "the scanf function" do let(:node) { Puppet::Node.new('localhost') } let(:compiler) { Puppet::Parser::Compiler.new(node) } let(:scope) { Puppet::Parser::Scope.new(compiler) } it 'scans a value and returns an array' do expect(scope.function_scanf(['42', '%i'])[0] == 42) end...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/create_resources_spec.rb
spec/unit/parser/functions/create_resources_spec.rb
require 'puppet' require 'spec_helper' require 'puppet_spec/compiler' require 'puppet_spec/files' describe 'function for dynamically creating resources' do include PuppetSpec::Compiler include PuppetSpec::Files before :each do node = Puppet::Node.new("floppy", :environment => 'production') @compile...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/fqdn_rand_spec.rb
spec/unit/parser/functions/fqdn_rand_spec.rb
require 'spec_helper' require 'puppet_spec/scope' describe "the fqdn_rand function" do include PuppetSpec::Scope it "returns an integer" do expect(fqdn_rand(3)).to be_an(Integer) end it "provides a random number strictly less than the given max" do expect(fqdn_rand(3)).to satisfy {|n| n < 3 } end ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/split_spec.rb
spec/unit/parser/functions/split_spec.rb
require 'spec_helper' describe "the split function" do before :each do node = Puppet::Node.new('localhost') compiler = Puppet::Parser::Compiler.new(node) @scope = Puppet::Parser::Scope.new(compiler) end it 'should raise a ParseError' do expect { @scope.function_split([ '130;236;254;10', ';...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/inline_template_spec.rb
spec/unit/parser/functions/inline_template_spec.rb
require 'spec_helper' describe "the inline_template function" do let(:node) { Puppet::Node.new('localhost') } let(:compiler) { Puppet::Parser::Compiler.new(node) } let(:scope) { Puppet::Parser::Scope.new(compiler) } it "should concatenate template wrapper outputs for multiple templates" do expect(inline_t...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/tagged_spec.rb
spec/unit/parser/functions/tagged_spec.rb
require 'spec_helper' describe "the 'tagged' function" do before :each do node = Puppet::Node.new('localhost') compiler = Puppet::Parser::Compiler.new(node) @scope = Puppet::Parser::Scope.new(compiler) end it "should exist" do expect(Puppet::Parser::Functions.function(:tagged)).to eq("func...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/digest_spec.rb
spec/unit/parser/functions/digest_spec.rb
require 'spec_helper' describe "the digest function", :uses_checksums => true do before :each do n = Puppet::Node.new('unnamed') c = Puppet::Parser::Compiler.new(n) @scope = Puppet::Parser::Scope.new(c) end it "should exist" do expect(Puppet::Parser::Functions.function("digest")).to eq("function...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/lookup_spec.rb
spec/unit/parser/functions/lookup_spec.rb
require 'spec_helper' require 'puppet/pops' require 'stringio' require 'puppet_spec/scope' describe "lookup function" do include PuppetSpec::Scope let :scope do create_test_scope_for_node('foo') end it 'should raise an error since this function is converted to 4x API)' do expect { scope.function_lookup(['k...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/tag_spec.rb
spec/unit/parser/functions/tag_spec.rb
require 'spec_helper' describe "the 'tag' function" do before :each do node = Puppet::Node.new('localhost') compiler = Puppet::Parser::Compiler.new(node) @scope = Puppet::Parser::Scope.new(compiler) end it "should exist" do expect(Puppet::Parser::Functions.function(:tag)).to eq("function_t...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/realize_spec.rb
spec/unit/parser/functions/realize_spec.rb
require 'spec_helper' require 'matchers/resource' require 'puppet_spec/compiler' describe "the realize function" do include Matchers::Resource include PuppetSpec::Compiler it "realizes a single, referenced resource" do catalog = compile_to_catalog(<<-EOM) @notify { testing: } realize(Notify[test...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/template_spec.rb
spec/unit/parser/functions/template_spec.rb
require 'spec_helper' describe "the template function" do let :node do Puppet::Node.new('localhost') end let :compiler do Puppet::Parser::Compiler.new(node) end let :scope do Puppet::Parser::Scope.new(compiler) end it "concatenates outputs for multiple templates" do tw1 = double("template_wrapper1"...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/functions/regsubst_spec.rb
spec/unit/parser/functions/regsubst_spec.rb
require 'spec_helper' describe "the regsubst function" do before :each do node = Puppet::Node.new('localhost') compiler = Puppet::Parser::Compiler.new(node) @scope = Puppet::Parser::Scope.new(compiler) end it 'should raise an ParseError' do expect do @scope.function_regsubst( [...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/ast/block_expression_spec.rb
spec/unit/parser/ast/block_expression_spec.rb
require 'spec_helper' require 'puppet/parser/ast/block_expression' describe 'Puppet::Parser::AST::BlockExpression' do class StackDepthAST < Puppet::Parser::AST attr_reader :call_depth def evaluate(*options) @call_depth = caller.length end end NO_SCOPE = nil def depth_probe StackDepthAST...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/parser/ast/leaf_spec.rb
spec/unit/parser/ast/leaf_spec.rb
require 'spec_helper' describe Puppet::Parser::AST::Leaf do before :each do node = Puppet::Node.new('localhost') compiler = Puppet::Parser::Compiler.new(node) @scope = Puppet::Parser::Scope.new(compiler) @value = double('value') @leaf = Puppet::Parser::AST::Leaf.new(:value => @value) end ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/other/selinux_spec.rb
spec/unit/other/selinux_spec.rb
require 'spec_helper' describe Puppet::Type.type(:file), " when manipulating file contexts" do include PuppetSpec::Files before :each do @file = Puppet::Type::File.new( :name => make_absolute("/tmp/foo"), :ensure => "file", :seluser => "user_u", :selrole => "role_r", :seltype =>...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/context/trusted_information_spec.rb
spec/unit/context/trusted_information_spec.rb
require 'spec_helper' require 'puppet/certificate_factory' require 'puppet/context/trusted_information' describe Puppet::Context::TrustedInformation, :unless => RUBY_PLATFORM == 'java' do let(:key) { OpenSSL::PKey::RSA.new(Puppet[:keylength]) } let(:csr) do csr = Puppet::SSL::CertificateRequest.new("csr") ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/external_client_spec.rb
spec/unit/http/external_client_spec.rb
require 'spec_helper' require 'puppet/http' # Simple "external" client to make get & post requests. This is used # to test the old HTTP API, such as requiring use_ssl and basic_auth # to be passed as options. class Puppet::HTTP::TestExternal def initialize(host, port, options = {}) @host = host @port = port ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/response_spec.rb
spec/unit/http/response_spec.rb
require 'spec_helper' require 'puppet/http' describe Puppet::HTTP::Response do let(:uri) { URI.parse('https://www.example.com') } let(:client) { Puppet::HTTP::Client.new } it "returns the request URL" do stub_request(:get, uri) response = client.get(uri) expect(response.url).to eq(uri) end it ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/site_spec.rb
spec/unit/http/site_spec.rb
require 'spec_helper' require 'puppet/http' describe Puppet::HTTP::Site do let(:scheme) { 'https' } let(:host) { 'rubygems.org' } let(:port) { 443 } def create_site(scheme, host, port) described_class.new(scheme, host, port) end it 'accepts scheme, host, and port' do site = cr...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/client_spec.rb
spec/unit/http/client_spec.rb
require 'spec_helper' require 'puppet/http' describe Puppet::HTTP::Client do let(:uri) { URI.parse('https://www.example.com') } let(:puppet_context) { Puppet::SSL::SSLContext.new } let(:system_context) { Puppet::SSL::SSLContext.new } let(:client) { described_class.new(ssl_context: puppet_context, system_ssl_co...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
true
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/pool_entry_spec.rb
spec/unit/http/pool_entry_spec.rb
require 'spec_helper' require 'puppet/http' describe Puppet::HTTP::PoolEntry do let(:connection) { double('connection') } let(:verifier) { double('verifier') } def create_session(connection, expiration_time = nil) expiration_time ||= Time.now + 60 * 60 described_class.new(connection, verifier, expirat...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/proxy_spec.rb
spec/unit/http/proxy_spec.rb
require 'uri' require 'spec_helper' require 'puppet/http' describe Puppet::HTTP::Proxy do before(:all) do ENV['http_proxy'] = nil ENV['HTTP_PROXY'] = nil end host, port, user, password = 'some.host', 1234, 'user1', 'pAssw0rd' def expects_direct_connection_to(http, www) expect(http.address).to eq(...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/session_spec.rb
spec/unit/http/session_spec.rb
require 'spec_helper' require 'puppet/http' describe Puppet::HTTP::Session do let(:ssl_context) { Puppet::SSL::SSLContext.new } let(:client) { Puppet::HTTP::Client.new(ssl_context: ssl_context) } let(:uri) { URI.parse('https://www.example.com') } let(:good_service) { double('good', url: uri, connect: nil) ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/factory_spec.rb
spec/unit/http/factory_spec.rb
require 'spec_helper' require 'puppet/http' describe Puppet::HTTP::Factory do before(:all) do ENV['http_proxy'] = nil ENV['HTTP_PROXY'] = nil end let(:site) { Puppet::HTTP::Site.new('https', 'www.example.com', 443) } def create_connection(site) factory = described_class.new factory.create_con...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/service_spec.rb
spec/unit/http/service_spec.rb
require 'spec_helper' require 'puppet_spec/network' require 'puppet/http' require 'puppet/file_serving' require 'puppet/file_serving/content' require 'puppet/file_serving/metadata' describe Puppet::HTTP::Service do include PuppetSpec::Network let(:ssl_context) { Puppet::SSL::SSLContext.new } let(:client) { Pupp...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/dns_spec.rb
spec/unit/http/dns_spec.rb
require 'spec_helper' require 'puppet/http' describe Puppet::HTTP::DNS do before do @dns_mock_object = double('dns') allow(Resolv::DNS).to receive(:new).and_return(@dns_mock_object) @rr_type = Resolv::DNS::Resource::IN::SRV @test_srv_domain = "domain.com" @test_a_hostname = "puppet.domai...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/resolver_spec.rb
spec/unit/http/resolver_spec.rb
require 'spec_helper' require 'puppet/http' describe Puppet::HTTP::Resolver do let(:ssl_context) { Puppet::SSL::SSLContext.new } let(:client) { Puppet::HTTP::Client.new(ssl_context: ssl_context) } let(:session) { client.create_session } let(:uri) { URI.parse('https://www.example.com') } context 'when resolv...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/pool_spec.rb
spec/unit/http/pool_spec.rb
require 'spec_helper' require 'openssl' require 'puppet/network/http' require 'puppet/network/http_pool' describe Puppet::HTTP::Pool do let(:site) do Puppet::HTTP::Site.new('https', 'rubygems.org', 443) end let(:different_site) do Puppet::HTTP::Site.new('https', 'github.com', 443) end let(:ssl_con...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/service/ca_spec.rb
spec/unit/http/service/ca_spec.rb
require 'spec_helper' require 'puppet/http' describe Puppet::HTTP::Service::Ca do let(:ssl_context) { Puppet::SSL::SSLContext.new } let(:client) { Puppet::HTTP::Client.new(ssl_context: ssl_context) } let(:session) { Puppet::HTTP::Session.new(client, []) } let(:subject) { client.create_session.route_to(:ca) } ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/service/puppetserver_spec.rb
spec/unit/http/service/puppetserver_spec.rb
require 'spec_helper' require 'puppet/http' describe Puppet::HTTP::Service::Puppetserver do let(:ssl_context) { Puppet::SSL::SSLContext.new } let(:client) { Puppet::HTTP::Client.new(ssl_context: ssl_context) } let(:subject) { client.create_session.route_to(:puppetserver) } before :each do Puppet[:server] ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/service/report_spec.rb
spec/unit/http/service/report_spec.rb
require 'spec_helper' require 'puppet_spec/network' require 'puppet/http' describe Puppet::HTTP::Service::Report do include PuppetSpec::Network let(:ssl_context) { Puppet::SSL::SSLContext.new } let(:client) { Puppet::HTTP::Client.new(ssl_context: ssl_context) } let(:subject) { client.create_session.route_to(:...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/service/file_server_spec.rb
spec/unit/http/service/file_server_spec.rb
require 'spec_helper' require 'puppet_spec/network' require 'puppet/http' describe Puppet::HTTP::Service::FileServer do include PuppetSpec::Files include PuppetSpec::Network let(:ssl_context) { Puppet::SSL::SSLContext.new } let(:client) { Puppet::HTTP::Client.new(ssl_context: ssl_context) } let(:subject) { ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/service/compiler_spec.rb
spec/unit/http/service/compiler_spec.rb
# coding: utf-8 require 'spec_helper' require 'puppet/http' describe Puppet::HTTP::Service::Compiler do let(:ssl_context) { Puppet::SSL::SSLContext.new } let(:client) { Puppet::HTTP::Client.new(ssl_context: ssl_context) } let(:subject) { client.create_session.route_to(:puppet) } let(:environment) { 'testing' ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false