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
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/puppet_pal_spec.rb
spec/unit/puppet_pal_spec.rb
require 'spec_helper' require 'puppet_spec/files' require_relative 'puppet_pal_2pec'
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/datatypes_spec.rb
spec/unit/datatypes_spec.rb
require 'spec_helper' require 'puppet_spec/compiler' require 'puppet_spec/files' require 'puppet/pops' module PuppetSpec::DataTypes describe "Puppet::DataTypes" do include PuppetSpec::Compiler include PuppetSpec::Files let(:modules) { { 'mytest' => mytest } } let(:datatypes) { {} } let(:environments_dir) { ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/parameter_spec.rb
spec/unit/parameter_spec.rb
require 'spec_helper' require 'puppet/parameter' describe Puppet::Parameter do before do @class = Class.new(Puppet::Parameter) do @name = :foo end @class.initvars @resource = double('resource') allow(@resource).to receive(:expects) allow(@resource).to receive(:pathbuilder) @paramet...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/resource_spec.rb
spec/unit/resource_spec.rb
require 'spec_helper' require 'puppet/resource' describe Puppet::Resource do include PuppetSpec::Files let(:basepath) { make_absolute("/somepath") } let(:environment) { Puppet::Node::Environment.create(:testing, []) } def expect_lookup(key, options = {}) expectation = receive(:unchecked_key_lookup).with(...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/node_spec.rb
spec/unit/node_spec.rb
require 'spec_helper' require 'matchers/json' require 'puppet_spec/files' describe Puppet::Node do include JSONMatchers include PuppetSpec::Files let(:environment) { Puppet::Node::Environment.create(:bar, []) } let(:env_loader) { Puppet::Environments::Static.new(environment) } describe "when managing its e...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/x509/pem_store_spec.rb
spec/unit/x509/pem_store_spec.rb
# coding: utf-8 require 'spec_helper' require 'puppet/x509' class Puppet::X509::TestPemStore include Puppet::X509::PemStore end describe Puppet::X509::PemStore do include PuppetSpec::Files let(:subject) { Puppet::X509::TestPemStore.new } def with_unreadable_file path = tmpfile('pem_store') Puppet::F...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/x509/cert_provider_spec.rb
spec/unit/x509/cert_provider_spec.rb
require 'spec_helper' require 'puppet/x509' describe Puppet::X509::CertProvider do include PuppetSpec::Files def create_provider(options) described_class.new(**options) end def expects_public_file(path) if Puppet::Util::Platform.windows? current_sid = Puppet::Util::Windows::SID.name_to_sid(Pupp...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/profiler_spec.rb
spec/unit/util/profiler_spec.rb
require 'spec_helper' require 'puppet/util/profiler' describe Puppet::Util::Profiler do let(:profiler) { TestProfiler.new() } it "supports adding profilers" do subject.add_profiler(profiler) expect(subject.current[0]).to eq(profiler) end it "supports removing profilers" do subject.add_profiler(pr...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/splayer_spec.rb
spec/unit/util/splayer_spec.rb
require 'spec_helper' require 'puppet/util/splayer' describe Puppet::Util::Splayer do include Puppet::Util::Splayer let (:subject) { self } before do Puppet[:splay] = true Puppet[:splaylimit] = "10" end it "should do nothing if splay is disabled" do Puppet[:splay] = false expect(subject).n...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/monkey_patches_spec.rb
spec/unit/util/monkey_patches_spec.rb
require 'spec_helper' require 'puppet/util/monkey_patches' describe Dir do describe '.exists?' do it 'returns false if the directory does not exist' do expect(Dir.exists?('/madeupdirectory')).to be false end it 'returns true if the directory exists' do expect(Dir.exists?(__dir__)).to be tru...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/rpm_compare_spec.rb
spec/unit/util/rpm_compare_spec.rb
# frozen_string_literal: true require 'spec_helper' require 'puppet/util/rpm_compare' describe Puppet::Util::RpmCompare do class RpmTest extend Puppet::Util::RpmCompare end describe '.rpmvercmp' do # test cases munged directly from rpm's own # tests/rpmvercmp.at it { expect(RpmTest.rpmvercmp('1...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/terminal_spec.rb
spec/unit/util/terminal_spec.rb
require 'spec_helper' require 'puppet/util/terminal' describe Puppet::Util::Terminal do describe '.width' do before { allow(Puppet.features).to receive(:posix?).and_return(true) } it 'should invoke `stty` and return the width' do height, width = 100, 200 expect(subject).to receive(:`).with('stty...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/at_fork_spec.rb
spec/unit/util/at_fork_spec.rb
require 'spec_helper' describe 'Puppet::Util::AtFork' do EXPECTED_HANDLER_METHODS = [:prepare, :parent, :child] before :each do Puppet::Util.class_exec do remove_const(:AtFork) if defined?(Puppet::Util::AtFork) const_set(:AtFork, Module.new) end end after :each do Puppet::Util.class_e...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/retry_action_spec.rb
spec/unit/util/retry_action_spec.rb
require 'spec_helper' require 'puppet/util/retry_action' describe Puppet::Util::RetryAction do let (:exceptions) { [ Puppet::Error, NameError ] } it "doesn't retry SystemExit" do expect do Puppet::Util::RetryAction.retry_action( :retries => 0 ) do raise SystemExit end end.to exit_with...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/suidmanager_spec.rb
spec/unit/util/suidmanager_spec.rb
require 'spec_helper' describe Puppet::Util::SUIDManager do let :user do Puppet::Type.type(:user).new(:name => 'name', :uid => 42, :gid => 42) end let :xids do Hash.new {|h,k| 0} end before :each do allow(Puppet::Util::SUIDManager).to receive(:convert_xid).and_return(42) pwent = double('pwe...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/inifile_spec.rb
spec/unit/util/inifile_spec.rb
require 'spec_helper' require 'puppet/util/inifile' describe Puppet::Util::IniConfig::Section do subject { described_class.new('testsection', '/some/imaginary/file') } describe "determining if the section is dirty" do it "is not dirty on creation" do expect(subject).to_not be_dirty end it "is ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/reference_spec.rb
spec/unit/util/reference_spec.rb
require 'spec_helper' require 'puppet/util/reference' describe Puppet::Util::Reference do it "should create valid Markdown extension definition lists" do my_fragment = nil Puppet::Util::Reference.newreference :testreference, :doc => "A peer of the type and configuration references, but with no useful informa...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/posix_spec.rb
spec/unit/util/posix_spec.rb
require 'spec_helper' require 'puppet/ffi/posix' require 'puppet/util/posix' class PosixTest include Puppet::Util::POSIX end describe Puppet::Util::POSIX do before do @posix = PosixTest.new end describe '.groups_of' do let(:mock_user_data) { double(user, :gid => 1000) } let(:ngroups_ptr) { dou...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/watcher_spec.rb
spec/unit/util/watcher_spec.rb
require 'spec_helper' require 'puppet/util/watcher' describe Puppet::Util::Watcher do describe "the common file ctime watcher" do FakeStat = Struct.new(:ctime) def ctime(time) FakeStat.new(time) end let(:filename) { "fake" } it "is initially unchanged" do expect(Puppet::FileSystem...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/package_spec.rb
spec/unit/util/package_spec.rb
require 'spec_helper' require 'puppet/util/package' describe Puppet::Util::Package, " versioncmp" do it "should be able to be used as a module function" do expect(Puppet::Util::Package).to respond_to(:versioncmp) end it "should be able to sort a long set of various unordered versions" do ary = %w{ 1.1...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/colors_spec.rb
spec/unit/util/colors_spec.rb
require 'spec_helper' describe Puppet::Util::Colors do include Puppet::Util::Colors let (:message) { 'a message' } let (:color) { :black } let (:subject) { self } describe ".console_color" do it { is_expected.to respond_to :console_color } it "should generate ANSI escape sequences" do expect...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/tag_set_spec.rb
spec/unit/util/tag_set_spec.rb
require 'spec_helper' require 'puppet/util/tag_set' RSpec::Matchers.define :be_one_of do |*expected| match do |actual| expected.include? actual end failure_message do |actual| "expected #{actual.inspect} to be one of #{expected.map(&:inspect).join(' or ')}" end end describe Puppet::Util::TagSet do ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/selinux_spec.rb
spec/unit/util/selinux_spec.rb
require 'spec_helper' require 'pathname' require 'puppet/util/selinux' describe Puppet::Util::SELinux do include Puppet::Util::SELinux let(:selinux) { double('selinux', is_selinux_enabled: 0) } before :each do stub_const('Selinux', selinux) end describe "selinux_support?" do it "should return tru...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/plist_spec.rb
spec/unit/util/plist_spec.rb
# coding: utf-8 require 'spec_helper' require 'puppet/util/plist' require 'puppet_spec/files' describe Puppet::Util::Plist, :if => Puppet.features.cfpropertylist? do include PuppetSpec::Files let(:valid_xml_plist) do '<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/network_device_spec.rb
spec/unit/util/network_device_spec.rb
require 'spec_helper' require 'ostruct' require 'puppet/util/network_device' describe Puppet::Util::NetworkDevice do before(:each) do @device = OpenStruct.new(:name => "name", :provider => "test", :url => "telnet://admin:password@127.0.0.1", :options => { :debug => false }) end after(:each) do Puppet::...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/symbolic_file_mode_spec.rb
spec/unit/util/symbolic_file_mode_spec.rb
require 'spec_helper' require 'puppet/util/symbolic_file_mode' describe Puppet::Util::SymbolicFileMode do include Puppet::Util::SymbolicFileMode describe "#valid_symbolic_mode?" do %w{ 0 0000 1 1 7 11 77 111 777 11 0 00000 01 01 07 011 077 0111 0777 011 = - + u= g= o= a= u...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/logging_spec.rb
spec/unit/util/logging_spec.rb
require 'spec_helper' require 'puppet/util/logging' Puppet::Type.newtype(:logging_test) do newparam(:name, isnamevar: true) newproperty(:path) end Puppet::Type.type(:logging_test).provide(:logging_test) do end class LoggingTester include Puppet::Util::Logging end class PuppetStackCreator def raise_error(exc...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/autoload_spec.rb
spec/unit/util/autoload_spec.rb
require 'spec_helper' require 'fileutils' require 'puppet/util/autoload' describe Puppet::Util::Autoload do include PuppetSpec::Files let(:env) { Puppet::Node::Environment.create(:foo, []) } before do @autoload = Puppet::Util::Autoload.new("foo", "tmp") @loaded = {} allow(@autoload.class).to rece...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/json_lockfile_spec.rb
spec/unit/util/json_lockfile_spec.rb
require 'spec_helper' require 'puppet/util/json_lockfile' describe Puppet::Util::JsonLockfile do require 'puppet_spec/files' include PuppetSpec::Files before(:each) do @lockfile = tmpfile("lock") @lock = Puppet::Util::JsonLockfile.new(@lockfile) end describe "#lock" do it "should create a lock...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/tagging_spec.rb
spec/unit/util/tagging_spec.rb
# coding: utf-8 require 'spec_helper' require 'puppet/util/tagging' describe Puppet::Util::Tagging do let(:tagger) { Object.new.extend(Puppet::Util::Tagging) } it "should add tags to the returned tag list" do tagger.tag("one") expect(tagger.tags).to include("one") end it "should add all provided tag...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/constant_inflector_spec.rb
spec/unit/util/constant_inflector_spec.rb
require 'spec_helper' require 'puppet/util/constant_inflector' describe Puppet::Util::ConstantInflector, "when converting file names to constants" do it "should capitalize terms" do expect(subject.file2constant("file")).to eq("File") end it "should switch all '/' characters to double colons" do expect(...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/pidlock_spec.rb
spec/unit/util/pidlock_spec.rb
require 'spec_helper' require 'puppet/util/pidlock' describe Puppet::Util::Pidlock, if: !Puppet::Util::Platform.jruby? do require 'puppet_spec/files' include PuppetSpec::Files before(:each) do @lockfile = tmpfile("lock") @lock = Puppet::Util::Pidlock.new(@lockfile) allow(Facter).to receive(:value)....
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/user_attr_spec.rb
spec/unit/util/user_attr_spec.rb
require 'spec_helper' require 'puppet/util/user_attr' describe UserAttr do before do user_attr = ["foo::::type=role", "bar::::type=normal;profile=foobar"] allow(File).to receive(:readlines).and_return(user_attr) end describe "when getting attributes by name" do it "should return nil if there is no ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/diff_spec.rb
spec/unit/util/diff_spec.rb
require 'spec_helper' require 'puppet/util/diff' require 'puppet/util/execution' describe Puppet::Util::Diff do let(:baz_output) { Puppet::Util::Execution::ProcessOutput.new('baz', 0) } describe ".diff" do it "should execute the diff command with arguments" do Puppet[:diff] = 'foo' Puppet[:diff_ar...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/multi_match_spec.rb
spec/unit/util/multi_match_spec.rb
require 'spec_helper' require 'puppet/util/multi_match' describe "The Puppet::Util::MultiMatch" do let(:not_nil) { Puppet::Util::MultiMatch::NOT_NIL } let(:mm) { Puppet::Util::MultiMatch } it "matches against not nil" do expect(not_nil === 3).to be(true) end it "matches against multiple values" do ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/rdoc_spec.rb
spec/unit/util/rdoc_spec.rb
require 'spec_helper' require 'puppet/util/rdoc' require 'rdoc/rdoc' describe Puppet::Util::RDoc do describe "when generating RDoc HTML documentation" do before :each do @rdoc = double('rdoc') allow(RDoc::RDoc).to receive(:new).and_return(@rdoc) end it "should tell RDoc to generate document...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/run_mode_spec.rb
spec/unit/util/run_mode_spec.rb
require 'spec_helper' describe Puppet::Util::RunMode do before do @run_mode = Puppet::Util::RunMode.new('fake') end describe Puppet::Util::UnixRunMode, :unless => Puppet::Util::Platform.windows? do before do @run_mode = Puppet::Util::UnixRunMode.new('fake') end describe "#conf_dir" do ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/backups_spec.rb
spec/unit/util/backups_spec.rb
require 'spec_helper' require 'puppet/util/backups' describe Puppet::Util::Backups do include PuppetSpec::Files let(:bucket) { double('bucket', :name => "foo") } let!(:file) do f = Puppet::Type.type(:file).new(:name => path, :backup => 'foo') allow(f).to receive(:bucket).and_return(bucket) f end ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/execution_stub_spec.rb
spec/unit/util/execution_stub_spec.rb
require 'spec_helper' describe Puppet::Util::ExecutionStub do it "should use the provided stub code when 'set' is called" do Puppet::Util::ExecutionStub.set do |command, options| expect(command).to eq(['/bin/foo', 'bar']) "stub output" end expect(Puppet::Util::ExecutionStub.current_value).not...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/character_encoding_spec.rb
spec/unit/util/character_encoding_spec.rb
require 'spec_helper' require 'puppet/util/character_encoding' require 'puppet_spec/character_encoding' describe Puppet::Util::CharacterEncoding do describe "::convert_to_utf_8" do context "when passed a string that is already UTF-8" do context "with valid encoding" do let(:utf8_string) { "\u06FF\u...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/windows_spec.rb
spec/unit/util/windows_spec.rb
# frozen_string_literal: true require 'spec_helper' describe Puppet::Util::Windows do %w[ ADSI ADSI::ADSIObject ADSI::User ADSI::UserProfile ADSI::Group EventLog File Process Registry Service SID ].each do |name| it "defines Puppet::Util::Windows::#{name}" do ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/metric_spec.rb
spec/unit/util/metric_spec.rb
require 'spec_helper' require 'puppet/util/metric' describe Puppet::Util::Metric do before do @metric = Puppet::Util::Metric.new("foo") end [:type, :name, :value, :label].each do |name| it "should have a #{name} attribute" do expect(@metric).to respond_to(name) expect(@metric).to respond_to...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/docs_spec.rb
spec/unit/util/docs_spec.rb
require 'spec_helper' describe Puppet::Util::Docs do describe '.scrub' do let(:my_cleaned_output) do %q{This resource type uses the prescribed native tools for creating groups and generally uses POSIX APIs for retrieving information about them. It does not directly modify `/etc/passwd` or anything. * Ju...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/warnings_spec.rb
spec/unit/util/warnings_spec.rb
require 'spec_helper' describe Puppet::Util::Warnings do before(:all) do @msg1 = "booness" @msg2 = "more booness" end before(:each) do Puppet.debug = true end after (:each) do Puppet.debug = false end {:notice => "notice_once", :warning => "warnonce", :debug => "debug_once"}.each do |l...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/execution_spec.rb
spec/unit/util/execution_spec.rb
# encoding: UTF-8 require 'spec_helper' require 'puppet/file_system/uniquefile' require 'puppet_spec/character_encoding' describe Puppet::Util::Execution, if: !Puppet::Util::Platform.jruby? do include Puppet::Util::Execution # utility methods to help us test some private methods without being quite so verbose d...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/lockfile_spec.rb
spec/unit/util/lockfile_spec.rb
require 'spec_helper' require 'puppet/util/lockfile' module LockfileSpecHelper def self.run_in_forks(count, &blk) forks = {} results = [] count.times do |i| forks[i] = {} forks[i][:read], forks[i][:write] = IO.pipe forks[i][:pid] = fork do forks[i][:read].close res = y...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/filetype_spec.rb
spec/unit/util/filetype_spec.rb
require 'spec_helper' require 'puppet/util/filetype' # XXX Import all of the tests into this file. describe Puppet::Util::FileType do describe "the flat filetype" do let(:path) { '/my/file' } let(:type) { Puppet::Util::FileType.filetype(:flat) } let(:file) { type.new(path) } it "should exist" do ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/json_spec.rb
spec/unit/util/json_spec.rb
# coding: utf-8 require 'spec_helper' require 'puppet/util/json' describe Puppet::Util::Json do include PuppetSpec::Files shared_examples_for 'json file loader' do |load_method| it 'reads a JSON file from disk' do file_path = file_containing('input', JSON.dump({ "my" => "data" })) expect(load_met...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/checksums_spec.rb
spec/unit/util/checksums_spec.rb
require 'spec_helper' require 'puppet/util/checksums' describe Puppet::Util::Checksums do include PuppetSpec::Files before do @summer = Puppet::Util::Checksums end content_sums = [:md5, :md5lite, :sha1, :sha1lite, :sha256, :sha256lite, :sha512, :sha384, :sha224] file_only = [:ctime, :mtime, :none] ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/watched_file_spec.rb
spec/unit/util/watched_file_spec.rb
require 'spec_helper' require 'puppet/util/watched_file' require 'puppet/util/watcher' describe Puppet::Util::WatchedFile do let(:an_absurdly_long_timeout) { Puppet::Util::Watcher::Timer.new(100000) } let(:an_immediate_timeout) { Puppet::Util::Watcher::Timer.new(0) } it "acts like a string so that it can be use...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/resource_template_spec.rb
spec/unit/util/resource_template_spec.rb
require 'spec_helper' require 'puppet/util/resource_template' describe Puppet::Util::ResourceTemplate do describe "when initializing" do it "should fail if the template does not exist" do expect(Puppet::FileSystem).to receive(:exist?).with("/my/template").and_return(false) expect { Puppet::Util::Res...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/skip_tags_spec.rb
spec/unit/util/skip_tags_spec.rb
# coding: utf-8 require 'spec_helper' require 'puppet/util/skip_tags' describe Puppet::Util::SkipTags do let(:tagger) { Puppet::Util::SkipTags.new([]) } it "should add qualified classes as single tags" do tagger.tag("one::two::three") expect(tagger.tags).to include("one::two::three") expect(tagger.ta...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/yaml_spec.rb
spec/unit/util/yaml_spec.rb
# coding: utf-8 require 'spec_helper' require 'puppet/util/yaml' describe Puppet::Util::Yaml do include PuppetSpec::Files let(:filename) { tmpfile("yaml") } shared_examples_for 'yaml file loader' do |load_method| it 'returns false when the file is empty' do file_path = file_containing('input', '') ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/feature_spec.rb
spec/unit/util/feature_spec.rb
require 'spec_helper' require 'puppet/util/feature' describe Puppet::Util::Feature do before do @features = Puppet::Util::Feature.new("features") allow(@features).to receive(:warn) end it "should not call associated code when adding a feature" do $loaded_feature = false @features.add(:myfeature...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/errors_spec.rb
spec/unit/util/errors_spec.rb
require 'spec_helper' require 'puppet/util/errors' class ErrorTester include Puppet::Util::Errors attr_accessor :line, :file end describe Puppet::Util::Errors do before do @tester = ErrorTester.new end it "should provide a 'fail' method" do expect(@tester).to respond_to(:fail) end it "should ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/log_spec.rb
spec/unit/util/log_spec.rb
# coding: utf-8 require 'spec_helper' require 'puppet/util/log' describe Puppet::Util::Log do include PuppetSpec::Files def log_notice(message) Puppet::Util::Log.new(:level => :notice, :message => message) end it "should write a given message to the specified destination" do arraydest = [] Puppe...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/storage_spec.rb
spec/unit/util/storage_spec.rb
require 'spec_helper' require 'yaml' require 'fileutils' require 'puppet/util/storage' describe Puppet::Util::Storage do include PuppetSpec::Files before(:each) do @basepath = File.expand_path("/somepath") end describe "when caching a symbol" do it "should return an empty hash" do expect(Puppe...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/command_line_spec.rb
spec/unit/util/command_line_spec.rb
require 'spec_helper' require 'puppet/face' require 'puppet/util/command_line' describe Puppet::Util::CommandLine do include PuppetSpec::Files context "#initialize" do it "should pull off the first argument if it looks like a subcommand" do command_line = Puppet::Util::CommandLine.new("puppet", %w{ cli...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/rubygems_spec.rb
spec/unit/util/rubygems_spec.rb
require 'spec_helper' require 'puppet/util/rubygems' describe Puppet::Util::RubyGems::Source do let(:gem_path) { File.expand_path('/foo/gems') } let(:gem_lib) { File.join(gem_path, 'lib') } let(:fake_gem) { double(:full_gem_path => gem_path) } describe "::new" do it "returns NoGemsSource if rubygems is no...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/profiler/wall_clock_spec.rb
spec/unit/util/profiler/wall_clock_spec.rb
require 'spec_helper' require 'puppet/util/profiler' describe Puppet::Util::Profiler::WallClock do it "logs the number of seconds it took to execute the segment" do profiler = Puppet::Util::Profiler::WallClock.new(nil, nil) message = profiler.do_finish(profiler.start(["foo", "bar"], "Testing"), ["foo", "ba...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/profiler/logging_spec.rb
spec/unit/util/profiler/logging_spec.rb
require 'spec_helper' require 'puppet/util/profiler' describe Puppet::Util::Profiler::Logging do let(:logger) { SimpleLog.new } let(:identifier) { "Profiling ID" } let(:logging_profiler) { TestLoggingProfiler.new(logger, identifier) } let(:profiler) do p = Puppet::Util::Profiler::AroundProfiler.new p.a...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/profiler/aggregate_spec.rb
spec/unit/util/profiler/aggregate_spec.rb
require 'spec_helper' require 'puppet/util/profiler' require 'puppet/util/profiler/around_profiler' require 'puppet/util/profiler/aggregate' describe Puppet::Util::Profiler::Aggregate do let(:logger) { AggregateSimpleLog.new } let(:profiler) { Puppet::Util::Profiler::Aggregate.new(logger, nil) } let(:profiler_mg...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/profiler/object_counts_spec.rb
spec/unit/util/profiler/object_counts_spec.rb
require 'spec_helper' require 'puppet/util/profiler' describe Puppet::Util::Profiler::ObjectCounts, unless: Puppet::Util::Platform.jruby? do # ObjectSpace is not enabled by default on JRuby it "reports the changes in the system object counts" do profiler = Puppet::Util::Profiler::ObjectCounts.new(nil, nil) ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/profiler/around_profiler_spec.rb
spec/unit/util/profiler/around_profiler_spec.rb
require 'spec_helper' require 'puppet/util/profiler' describe Puppet::Util::Profiler::AroundProfiler do let(:child) { TestAroundProfiler.new() } let(:profiler) { Puppet::Util::Profiler::AroundProfiler.new } before :each do profiler.add_profiler(child) end it "returns the value of the profiled segment" ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/watcher/periodic_watcher_spec.rb
spec/unit/util/watcher/periodic_watcher_spec.rb
require 'spec_helper' require 'puppet/util/watcher' describe Puppet::Util::Watcher::PeriodicWatcher do let(:enabled_timeout) { 1 } let(:disabled_timeout) { -1 } let(:a_value) { 15 } let(:a_different_value) { 16 } let(:unused_watcher) { double('unused watcher') } let(:unchanged_watcher) { a_watcher_report...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/ldap/connection_spec.rb
spec/unit/util/ldap/connection_spec.rb
require 'spec_helper' require 'puppet/util/ldap/connection' # So our mocks and such all work, even when ldap isn't available. unless Puppet.features.ldap? class LDAP class Conn def initialize(*args) end end class SSLConn < Conn; end LDAP_OPT_PROTOCOL_VERSION = 1 LDAP_OPT_REFERRALS =...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/ldap/manager_spec.rb
spec/unit/util/ldap/manager_spec.rb
require 'spec_helper' require 'puppet/util/ldap/manager' describe Puppet::Util::Ldap::Manager, :if => Puppet.features.ldap? do before do @manager = Puppet::Util::Ldap::Manager.new end it "should return self when specifying objectclasses" do expect(@manager.manages(:one, :two)).to equal(@manager) end ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/ldap/generator_spec.rb
spec/unit/util/ldap/generator_spec.rb
require 'spec_helper' require 'puppet/util/ldap/generator' describe Puppet::Util::Ldap::Generator do before do @generator = Puppet::Util::Ldap::Generator.new(:uno) end it "should require a parameter name at initialization" do expect { Puppet::Util::Ldap::Generator.new }.to raise_error(ArgumentError, /w...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/network_device/config_spec.rb
spec/unit/util/network_device/config_spec.rb
require 'spec_helper' require 'puppet/util/network_device/config' describe Puppet::Util::NetworkDevice::Config do include PuppetSpec::Files before(:each) do Puppet[:deviceconfig] = tmpfile('deviceconfig') end describe "when parsing device" do let(:config) { Puppet::Util::NetworkDevice::Config.new } ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/network_device/transport/base_spec.rb
spec/unit/util/network_device/transport/base_spec.rb
require 'spec_helper' require 'puppet/util/network_device/transport/base' describe Puppet::Util::NetworkDevice::Transport::Base do class TestTransport < Puppet::Util::NetworkDevice::Transport::Base end before(:each) do @transport = TestTransport.new end describe "when sending commands" do it "shou...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/command_line_utils/puppet_option_parser_spec.rb
spec/unit/util/command_line_utils/puppet_option_parser_spec.rb
require 'spec_helper' require 'puppet/util/command_line/puppet_option_parser' describe Puppet::Util::CommandLine::PuppetOptionParser do let(:option_parser) { described_class.new } describe "an option with a value" do it "parses a 'long' option with a value" do parses( :option => ["--angry", "Ang...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/windows/file_spec.rb
spec/unit/util/windows/file_spec.rb
require 'spec_helper' require 'puppet/util/windows' describe Puppet::Util::Windows::File, :if => Puppet::Util::Platform.windows? do include PuppetSpec::Files let(:nonexist_file) { 'C:\foo.bar' } let(:nonexist_path) { 'C:\somefile\that\wont\ever\exist' } let(:invalid_file_attributes) { 0xFFFFFFFF } #define INV...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/windows/string_spec.rb
spec/unit/util/windows/string_spec.rb
# encoding: UTF-8 require 'spec_helper' require 'puppet/util/windows' describe "Puppet::Util::Windows::String", :if => Puppet::Util::Platform.windows? do def wide_string(str) Puppet::Util::Windows::String.wide_string(str) end def converts_to_wide_string(string_value) expected = string_value.encode(Enco...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/windows/adsi_spec.rb
spec/unit/util/windows/adsi_spec.rb
require 'spec_helper' require 'puppet/util/windows' describe Puppet::Util::Windows::ADSI, :if => Puppet::Util::Platform.windows? do let(:connection) { double('connection') } let(:builtin_localized) { Puppet::Util::Windows::SID.sid_to_name('S-1-5-32') } # SYSTEM is special as English can retrieve it via Windows ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/windows/access_control_list_spec.rb
spec/unit/util/windows/access_control_list_spec.rb
require 'spec_helper' require 'puppet/util/windows' describe "Puppet::Util::Windows::AccessControlList", :if => Puppet::Util::Platform.windows? do let(:klass) { Puppet::Util::Windows::AccessControlList } let(:system_sid) { 'S-1-5-18' } let(:admins_sid) { 'S-1-5-544' } let(:none_sid) { 'S-1-0-0' } let(:sys...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/windows/sid_spec.rb
spec/unit/util/windows/sid_spec.rb
require 'spec_helper' describe "Puppet::Util::Windows::SID", :if => Puppet::Util::Platform.windows? do if Puppet::Util::Platform.windows? require 'puppet/util/windows' end let(:subject) { Puppet::Util::Windows::SID } let(:sid) { Puppet::Util::Windows::SID::LocalSystem } let(:invalid_sid) ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/windows/root_certs_spec.rb
spec/unit/util/windows/root_certs_spec.rb
require 'spec_helper' require 'puppet/util/windows' describe "Puppet::Util::Windows::RootCerts", :if => Puppet::Util::Platform.windows? do let(:x509_store) { Puppet::Util::Windows::RootCerts.instance.to_a } it "should return at least one X509 certificate" do expect(x509_store.to_a.size).to be >= 1 end it...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/windows/service_spec.rb
spec/unit/util/windows/service_spec.rb
require 'spec_helper' describe "Puppet::Util::Windows::Service", :if => Puppet.features.microsoft_windows? do require 'puppet/util/windows' before(:each) do allow(Puppet::Util::Windows::Error).to receive(:format_error_code) .with(anything) .and_return("fake error!") end def service_state_str(...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/windows/api_types_spec.rb
spec/unit/util/windows/api_types_spec.rb
# encoding: UTF-8 require 'spec_helper' describe "FFI::MemoryPointer", :if => Puppet::Util::Platform.windows? do # use 2 bad bytes at end so we have even number of bytes / characters let(:bad_string) { "hello invalid world".encode(Encoding::UTF_16LE) + "\xDD\xDD".force_encoding(Encoding::UTF_16LE) } let(:bad_st...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/windows/access_control_entry_spec.rb
spec/unit/util/windows/access_control_entry_spec.rb
require 'spec_helper' require 'puppet/util/windows' describe "Puppet::Util::Windows::AccessControlEntry", :if => Puppet::Util::Platform.windows? do let(:klass) { Puppet::Util::Windows::AccessControlEntry } let(:sid) { 'S-1-5-18' } let(:mask) { Puppet::Util::Windows::File::FILE_ALL_ACCESS } it "creates an acce...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/windows/eventlog_spec.rb
spec/unit/util/windows/eventlog_spec.rb
require 'spec_helper' require 'puppet/util/windows' describe Puppet::Util::Windows::EventLog, :if => Puppet::Util::Platform.windows? do before(:each) { @event_log = Puppet::Util::Windows::EventLog.new } after(:each) { @event_log.close } describe "class constants" do it "should define NULL_HANDLE as 0" do ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/windows/security_descriptor_spec.rb
spec/unit/util/windows/security_descriptor_spec.rb
require 'spec_helper' require 'puppet/util/windows' describe "Puppet::Util::Windows::SecurityDescriptor", :if => Puppet::Util::Platform.windows? do let(:system_sid) { Puppet::Util::Windows::SID::LocalSystem } let(:admins_sid) { Puppet::Util::Windows::SID::BuiltinAdministrators } let(:group_sid) { Puppet::Util::W...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/package/version/pip_spec.rb
spec/unit/util/package/version/pip_spec.rb
require 'spec_helper' require 'puppet/util/package/version/pip' describe Puppet::Util::Package::Version::Pip do describe "initialization" do shared_examples_for 'a valid version' do |input_version, output = input_version| [input_version, input_version.swapcase].each do |input| it "transforms #{inpu...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/package/version/debian_spec.rb
spec/unit/util/package/version/debian_spec.rb
require 'spec_helper' require 'puppet/util/package/version/debian' describe Puppet::Util::Package::Version::Debian do context "when creating new version should fail" do it "if is parsing symbols" do expect { described_class.parse(:absent) }.to raise_error(described_class::ValidationFailure) end end ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/package/version/rpm_spec.rb
spec/unit/util/package/version/rpm_spec.rb
require 'spec_helper' require 'puppet/util/package/version/rpm' describe Puppet::Util::Package::Version::Rpm do context "when parsing an invalid version" do it "raises ArgumentError" do expect { described_class.parse(:absent)}.to raise_error(ArgumentError) end end context "when creating new versi...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/package/version/range_spec.rb
spec/unit/util/package/version/range_spec.rb
require 'spec_helper' require 'puppet/util/package/version/range' class IntegerVersion class ValidationFailure < ArgumentError; end include Comparable REGEX_FULL = '(\d+)'.freeze REGEX_FULL_RX = /\A#{REGEX_FULL}\Z/.freeze def self.parse(ver) match, version = *ver.match(REGEX_FULL_RX) raise Valida...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util/log/destinations_spec.rb
spec/unit/util/log/destinations_spec.rb
require 'spec_helper' require 'puppet/util/json' require 'puppet/util/log' describe Puppet::Util::Log.desttypes[:report] do before do @dest = Puppet::Util::Log.desttypes[:report] end it "should require a report at initialization" do expect(@dest.new("foo").report).to eq("foo") end it "should send ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/type/file_spec.rb
spec/unit/type/file_spec.rb
# coding: utf-8 require 'spec_helper' describe Puppet::Type.type(:file) do include PuppetSpec::Files # precomputed checksum values for FILE_CONTENT FILE_CONTENT = 'file content'.freeze CHECKSUM_VALUES = { md5: 'd10b4c3ff123b26dc068d43a8bef2d23', md5lite: 'd10b4c3ff123b26dc068d43a8bef2d23', sha256:...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/type/group_spec.rb
spec/unit/type/group_spec.rb
require 'spec_helper' describe Puppet::Type.type(:group) do before do @class = Puppet::Type.type(:group) end it "should have a system_groups feature" do expect(@class.provider_feature(:system_groups)).not_to be_nil end it 'should default to `present`' do expect(@class.new(:name => "foo")[:ensur...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/type/filebucket_spec.rb
spec/unit/type/filebucket_spec.rb
require 'spec_helper' describe Puppet::Type.type(:filebucket) do include PuppetSpec::Files describe "when validating attributes" do %w{name server port path}.each do |attr| it "should have a '#{attr}' parameter" do expect(Puppet::Type.type(:filebucket).attrtype(attr.intern)).to eq(:param) ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/type/package_spec.rb
spec/unit/type/package_spec.rb
require 'spec_helper' describe Puppet::Type.type(:package) do before do allow(Process).to receive(:euid).and_return(0) allow(Puppet::Util::Storage).to receive(:store) end it "should have a :reinstallable feature that requires the :reinstall method" do expect(Puppet::Type.type(:package).provider_feat...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/type/schedule_spec.rb
spec/unit/type/schedule_spec.rb
require 'spec_helper' module ScheduleTesting def diff(unit, incr, method, count) diff = Time.now.to_i.send(method, incr * count) Time.at(diff) end def day(method, count) diff(:hour, 3600 * 24, method, count) end def hour(method, count) diff(:hour, 3600, method, count) end def min(metho...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/type/service_spec.rb
spec/unit/type/service_spec.rb
require 'spec_helper' def safely_load_service_type before(:each) do # We have a :confine block that calls execute in our upstart provider, which fails # on jruby. Thus, we stub it out here since we don't care to do any assertions on it. # This is only an issue if you're running these unit tests on a plat...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/type/noop_metaparam_spec.rb
spec/unit/type/noop_metaparam_spec.rb
require 'spec_helper' require 'puppet/type' describe Puppet::Type.type(:file).attrclass(:noop) do include PuppetSpec::Files before do allow(Puppet.settings).to receive(:use) @file = Puppet::Type.newfile :path => make_absolute("/what/ever") end it "should accept true as a value" do expect { @file...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/type/resources_spec.rb
spec/unit/type/resources_spec.rb
require 'spec_helper' # A type and provider that can be purged Puppet::Type.newtype(:purgeable_test) do ensurable newparam(:name) {} end Puppet::Type.type(:purgeable_test).provide(:purgeable_test) do def self.instances [] end end resources = Puppet::Type.type(:resources) # There are still plenty of tests...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/type/stage_spec.rb
spec/unit/type/stage_spec.rb
require 'spec_helper' describe Puppet::Type.type(:stage) do it "should have a 'name' parameter'" do expect(Puppet::Type.type(:stage).new(:name => :foo)[:name]).to eq(:foo) end end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/type/user_spec.rb
spec/unit/type/user_spec.rb
# encoding: utf-8 require 'spec_helper' describe Puppet::Type.type(:user) do before :each do @provider_class = described_class.provide(:simple) do has_features :manages_expiry, :manages_password_age, :manages_passwords, :manages_solaris_rbac, :manages_roles, :manages_shell mk_resource_methods d...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/type/exec_spec.rb
spec/unit/type/exec_spec.rb
require 'spec_helper' RSpec.describe Puppet::Type.type(:exec) do include PuppetSpec::Files def exec_tester(command, exitstatus = 0, rest = {}) allow(Puppet.features).to receive(:root?).and_return(true) output = rest.delete(:output) || '' output = Puppet::Util::Execution::ProcessOutput.new(output, ex...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/type/whit_spec.rb
spec/unit/type/whit_spec.rb
require 'spec_helper' whit = Puppet::Type.type(:whit) describe whit do it "should stringify in a way that users will regognise" do expect(whit.new(:name => "Foo::Bar").to_s).to eq("Foo::Bar") end end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/type/component_spec.rb
spec/unit/type/component_spec.rb
require 'spec_helper' component = Puppet::Type.type(:component) describe component do it "should have a :name attribute" do expect(component.attrclass(:name)).not_to be_nil end it "should use Class as its type when a normal string is provided as the title" do expect(component.new(:name => "bar").ref).t...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false