<commit_before>require 'rails_helper'

RSpec.describe 'tasks/show', type: :view do
  before(:each) do
    @task = assign(:task, create(:task))
  end

  it 'renders attributes in <p>' do
    render
    expect(rendered).to match(/Name/)
    expect(rendered).to match(/Token/)
    expect(rendered).to match(/Period/)
  end
end<commit_msg>add test for logs on task#show<commit_after>require 'rails_helper'

RSpec.describe 'tasks/show', type: :view do
  before(:each) do
    log = create(:ok_log)
    @task = assign(:task, log.task)
  end

  it 'renders attributes in <p>' do
    render
    expect(rendered).to match(/Name/)
    expect(rendered).to match(/Token/)
    expect(rendered).to match(/Period/)

    expect(rendered).to match(/ok/)
    expect(rendered).to match(/MyString/)
  end
end
{'fraction_non_alphanumeric': 0.14612452350698857, 'fraction_numerical': 0.0, 'mean_word_length': 3.608187134502924, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3504643', 'n_tokens_mistral': 268, 'n_tokens_neox': 252, 'n_words': 66}