<commit_before>require 'spec_helper'

describe QuadiconHelper do
  describe "#render_quadicon" do
    subject { helper.render_quadicon(item, {}) }

    let(:item) do
      FactoryGirl.create(:vm_vmware)#, :type => ManageIQ::Providers::Vmware::InfraManager::Vm.name)
    end

    it "renders quadicon for a vmware vm" do
      expect(subject).to have_selector('div.quadicon')
      expect(subject).to have_selector('div.quadicon div.flobj')
    end
  end

  describe "#render_quadicon_text" do
    before(:each) do
      @settings = {:display => {:quad_truncate => "front"}}
    end

    subject { helper.render_quadicon_text(item, row) }

    let(:row) do<commit_msg>Correct settings hash<commit_after>require 'spec_helper'

describe QuadiconHelper do
  describe "#render_quadicon" do
    subject { helper.render_quadicon(item, {}) }

    let(:item) do
      FactoryGirl.create(:vm_vmware)#, :type => ManageIQ::Providers::Vmware::InfraManager::Vm.name)
    end

    it "renders quadicon for a vmware vm" do
      expect(subject).to have_selector('div.quadicon')
      expect(subject).to have_selector('div.quadicon div.flobj')
    end
  end

  describe "#render_quadicon_text" do
    before(:each) do
      @settings = {:display => {:quad_truncate => "m"}}
    end

    subject { helper.render_quadicon_text(item, row) }

    let(:row) do
{'fraction_non_alphanumeric': 0.12855007473841554, 'fraction_numerical': 0.0, 'mean_word_length': 3.9047619047619047, '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': '7133184', 'n_tokens_mistral': 458, 'n_tokens_neox': 432, 'n_words': 93}