<commit_before>require 'spec_helper'

describe Konacha, type: :feature do
  before { Konacha.mode = :server }

  describe 'suite/test links' do
    let(:spec_file)  { 'empty_suite_and_test_spec' }
    let(:suite_name) { 'A test suite' }
    let(:test_name)  { 'A known test name' }

    before { visit '/' }

    describe 'suite link' do
      subject{ page.find_link('A test suite') }

      it 'should contain spec path and grep string' do
        subject['href'].should == "#{page.current_url}#{spec_file}?grep=#{URI.encode(suite_name)}"
      end
    end

    describe 'replay link (arrow icon)' do
      subject{ page.find(%Q{a[href="#{page.current_url}#{spec_file}?grep=#{URI.encode([suite_name, test_name].join(' '))}"]}) }<commit_msg>Adapt to Mocha using location.pathname now<commit_after>require 'spec_helper'

describe Konacha, type: :feature do
  before { Konacha.mode = :server }

  describe 'suite/test links' do
    let(:spec_file)  { 'empty_suite_and_test_spec' }
    let(:suite_name) { 'A test suite' }
    let(:test_name)  { 'A known test name' }

    before { visit '/' }

    describe 'suite link' do
      subject{ page.find_link('A test suite') }

      it 'should contain spec path and grep string' do
        subject['href'].should == "#{page.current_url}#{spec_file}/?grep=#{URI.encode(suite_name)}"
      end
    end

    describe 'replay link (arrow icon)' do
      subject{ page.find(%Q{a[href="#{page.current_url}#{spec_file}/?grep=#{URI.encode([suite_name, test_name].join(' '))}"]}) }
{'fraction_non_alphanumeric': 0.15643564356435644, 'fraction_numerical': 0.0, 'mean_word_length': 3.7523510971786833, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '629067', 'n_tokens_mistral': 528, 'n_tokens_neox': 510, 'n_words': 119}