<commit_before>require 'spec_helper'

describe 'managedmac::desktop', :type => 'class' do

  context "when none of the params are set" do
    it do
      should_not contain_mobileconfig('managedmac.desktop.alacarte')
    end
  end

end<commit_msg>re-spec managedmac::desktop<commit_after>require 'spec_helper'

describe 'managedmac::desktop', :type => 'class' do

  context "when none of the params are set" do
    it do
      should contain_mobileconfig('managedmac.desktop.alacarte').with_ensure('absent')
    end
  end

  context "when $override_picture_path is invalid" do
    let(:params) do
      { :override_picture_path => 'not a valid path', }
    end
    specify do
      expect {
        should compile
      }.to raise_error(Puppet::Error, /not an absolute path/)
    end
  end

  context "when $locked is not a Boolean" do
    let(:params) do
      { :locked => 'not a bool', }
    end
    specify do
      expect {
        should compile
      }.to raise_error(Puppet::Error, /not a boolean/)
    end
  end

  context "when $override_picture_path param is valid" do
    let(:params) do
      { :override_picture_path => "/path/to/some/file", }
    end
    specify do
      should contain_mobileconfig('managedmac.desktop.alacarte').with_ensure('present')
    end
  end

  context "when $locked param is valid" do
    let(:params) do
      { :locked => true, }
    end
    specify do
      should contain_mobileconfig('managedmac.desktop.alacarte').with_ensure('present')
    end
  end

end
{'fraction_non_alphanumeric': 0.10246174318030606, 'fraction_numerical': 0.0, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3733827', 'n_tokens_mistral': 474, 'n_tokens_neox': 460, 'n_words': 136}