<commit_before>require "spec_helper"

describe Brancher::DatabaseRenameService do
  describe ".rename" do
    before do
      allow(Brancher::DatabaseRenameService).to receive(:current_branch)
        .and_return(branch)
    end

    let(:configurations) do
      {
        env => {
          "adapter" => adapter,
          "pool" => 5,
          "timeout" => 5000,
          "database" => database_name
        }
      }
    end

    let(:adapter) do
      "sqlite3"
    end

    let(:database_name) do
      "db/sample_app_development.sqlite3"<commit_msg>Stub Rails.env to pass travis-ci<commit_after>require "spec_helper"

describe Brancher::DatabaseRenameService do
  describe ".rename" do
    before do
      allow(Brancher::DatabaseRenameService).to receive_messages(
        current_branch: branch,
        env: env
      )
    end

    let(:configurations) do
      {
        env => {
          "adapter" => adapter,
          "pool" => 5,
          "timeout" => 5000,
          "database" => database_name
        }
      }
    end

    let(:adapter) do
      "sqlite3"
    end

    let(:database_name) do
      "db/sample_app_development.sqlite3"
{'fraction_non_alphanumeric': 0.1063094209161625, 'fraction_numerical': 0.012100259291270527, 'mean_word_length': 2.1129032258064515, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '1681951', 'n_tokens_mistral': 368, 'n_tokens_neox': 353, 'n_words': 72}