<commit_before># encoding: utf-8

require 'spec_helper'
require 'pp'

describe 'Pinning' do
  SHOP_URL = '/indian-curry-berlin-bruesseler-str-17'

  # shortened basket creation scheme, with less checking.
  def basket_create
    visit root_path + '/12347'
    click_link 'Indian Curry'
    wait_until_content('Warenkorb')
    within('#hipsterTopBar') do
      click_on 'Choose Indian Curry'
    end
  end

  before do
    # reassign PINNING variable to get rid of the freeze and
    # allow custom assignments. Normally Ruby issues a warning,
    # but in we can ignore it safely in this context.
    silence_warnings { PINNING = { } }
  end

  # after(:all) do
  #  silence_warnings { PINNING = { }.freeze }
  # end

  context 'with shop url' do
    before { PINNING['shop_url'] = SHOP_URL }

    it 'skips shop selection' do
      visit root_path
      click_link 'Create New Basket'<commit_msg>really reset pinning (actually implements a2d4267)<commit_after># encoding: utf-8

require 'spec_helper'
require 'pp'

describe 'Pinning' do
  SHOP_URL = '/indian-curry-berlin-bruesseler-str-17'

  # shortened basket creation scheme, with less checking.
  def basket_create
    visit root_path + '/12347'
    click_link 'Indian Curry'
    wait_until_content('Warenkorb')
    within('#hipsterTopBar') do
      click_on 'Choose Indian Curry'
    end
  end

  before do
    # reassign PINNING variable to get rid of the freeze and
    # allow custom assignments. Normally Ruby issues a warning,
    # but in we can ignore it safely in this context.
    silence_warnings { PINNING = { } }
  end

  after(:all) do
    silence_warnings { PINNING = { }.freeze }
  end

  context 'with shop url' do
    before { PINNING['shop_url'] = SHOP_URL }

    it 'skips shop selection' do
      visit root_path
      click_link 'Create New Basket'
{'fraction_non_alphanumeric': 0.08378970427163199, 'fraction_numerical': 0.011500547645125958, 'mean_word_length': 3.1903669724770642, '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': '98155', 'n_tokens_mistral': 615, 'n_tokens_neox': 583, 'n_words': 192}