<commit_before>require "spec_helper"

describe ContainerSummaryHelper do
  REL_HASH_WITH_LINK = [:label, :image, :value, :link, :title]
  REL_HASH_WITHOUT_LINK = [:label, :image, :value]

  let(:container_project) { FactoryGirl.create(:container_project) }
  before do
    self.class.send(:include, ApplicationHelper)

    @record = FactoryGirl.create(:container_group, :container_project => container_project)

    login_as @user = FactoryGirl.create(:user)
  end

  context ".textual_container_project" do
    subject { textual_container_project }

    it 'show link when role allows' do
      @user.stub(:role_allows?).and_return(true)

      expect(subject.keys).to eq(REL_HASH_WITH_LINK)
      expect(subject[:value]).to eq(container_project.name)<commit_msg>Don't need to :create here<commit_after>require "spec_helper"

describe ContainerSummaryHelper do
  REL_HASH_WITH_LINK = [:label, :image, :value, :link, :title]
  REL_HASH_WITHOUT_LINK = [:label, :image, :value]

  let(:container_project) { FactoryGirl.create(:container_project) }
  before do
    self.class.send(:include, ApplicationHelper)

    @record = FactoryGirl.build(:container_group, :container_project => container_project)

    login_as @user = FactoryGirl.create(:user)
  end

  context ".textual_container_project" do
    subject { textual_container_project }

    it 'show link when role allows' do
      @user.stub(:role_allows?).and_return(true)

      expect(subject.keys).to eq(REL_HASH_WITH_LINK)
      expect(subject[:value]).to eq(container_project.name)
{'fraction_non_alphanumeric': 0.11428571428571428, 'fraction_numerical': 0.0, 'mean_word_length': 5.139442231075697, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6332149', 'n_tokens_mistral': 508, 'n_tokens_neox': 475, 'n_words': 95}