<commit_before>
describe "zabbix_template_item", :broken => true do
  let(:provider) { Puppet::Type.type(:zabbix_template_item) }
  
  it "should get defined as provider" do
  
    resource = Puppet::Type.type(:zabbix_template_item).new({
      :name => 'my rspec template item',
    })
    resource.provider.class.to_s.should == "Puppet::Type::Zabbix_template_item::ProviderRuby"
  end
  
  
  it "should return false on inexistant template apps" do
    resource = Puppet::Type.type(:zabbix_template_item).new({
      :name => 'not my rspec template item',
    })
    Puppet.settings[:config]= "#{File.dirname(__FILE__)}/../../../../tests/etc/puppet.conf"
    false == resource.provider().exists?()
  end
  
  it "should create a template item, find it and delete it again" do
    template = Puppet::Type.type(:zabbix_template).new({
      :name => 'my rspec items template',
    })
    resource = Puppet::Type.type(:zabbix_template_item).new({
      :name => 'my rspec item',
      :host => 'my rspec items template'
    })
    Puppet.settings[:config]= "#{File.dirname(__FILE__)}/../../../../tests/etc/puppet.conf"
    if !template.provider.exists?()
      template.provider().create()
    end
    resource.provider().create()
    true === resource.provider().exists?()
    resource.provider().destroy()
    false === resource.provider().exists?()
  end
end<commit_msg>mark unbroken and more spec<commit_after>
describe "zabbix_template_item" do
  let(:provider) { Puppet::Type.type(:zabbix_template_item) }
  
  it "should get defined as provider" do
  
    resource = Puppet::Type.type(:zabbix_template_item).new({
      :name => 'my rspec template item',
    })
    resource.provider.class.to_s.should == "Puppet::Type::Zabbix_template_item::ProviderRuby"
  end
  
  
  it "should return false on inexistant template items" do
    resource = Puppet::Type.type(:zabbix_template_item).new({
      :name => 'not my rspec template item',
    })
    Puppet.settings[:config]= "#{File.dirname(__FILE__)}/../../../../tests/etc/puppet.conf"
    false == resource.provider().exists?()
  end

  it "should return true on existant template items" do
    template = Puppet::Type.type(:zabbix_template).new({
      :name => 'my rspec items template',
    })
    resource = Puppet::Type.type(:zabbix_template_item).new({
      :name => 'my existing rspec item',
      :key => 'rspec.template.item.existing',
      :template => 'my rspec items template'
    })
    Puppet.settings[:config]= "#{File.dirname(__FILE__)}/../../../../tests/etc/puppet.conf"
    if !template.provider.exists?()
      template.provider().create()
    end
    true == resource.provider().exists?()
  end
  
  it "should create a template item, find it and delete it again" do
    template = Puppet::Type.type(:zabbix_template).new({
      :name => 'my rspec items template',
    })
    resource = Puppet::Type.type(:zabbix_template_item).new({
      :name => 'my rspec item',
      :key => 'rspec.template.item',
      :template => 'my rspec items template'
    })
    Puppet.settings[:config]= "#{File.dirname(__FILE__)}/../../../../tests/etc/puppet.conf"
    if !template.provider.exists?()
      template.provider().create()
    end
    resource.provider().create()
    true === resource.provider().exists?()
    resource.provider().destroy()
    false === resource.provider().exists?()
  end
end
{'fraction_non_alphanumeric': 0.16755793226381463, 'fraction_numerical': 0.0, 'mean_word_length': 3.3111395646606914, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '6198459', 'n_tokens_mistral': 1081, 'n_tokens_neox': 1069, 'n_words': 226}