<commit_before>require "rails_helper"

describe BootstrapBuilders::Button do
  let(:user) { create :user }

  it "supports arguments given in both array and hash style" do
    visit arguments_bootstrap_builders_buttons_path
    button = find(".bb-btn")

    expect(button[:class]).to eq "btn btn-default btn-lg bb-btn"
    expect(button.text).to eq "Arguments label"
    expect(button[:href]).to eq "/arguments/url"
    expect(button["data-confirm"]).to eq "Are you sure?"
    expect(page).to have_http_status(:success)
    expect(current_path).to eq arguments_bootstrap_builders_buttons_path
  end

  it "#bb_destroy_btn" do
    visit destroy_btn_bootstrap_builders_buttons_path(user_id: user.id)

    button = find(".bb-btn-destroy")
    expect(button[:href]).to eq "/test/destroy"
    expect(button.text).to eq "Delete"

    icon = find(".bb-btn-destroy i")
    expect(icon[:class]).to eq "fa fa-remove"
  end

  it "#bb_edit_btn" do
    visit edit_btn_bootstrap_builders_buttons_path(user_id: user.id)

    button = find(".bb-btn-edit")
    expect(button[:href]).to eq "/test/edit"
    expect(button.text).to eq "Edit"
<commit_msg>Add expect not_to include btn-default<commit_after>require "rails_helper"

describe BootstrapBuilders::Button do
  let(:user) { create :user }

  it "supports arguments given in both array and hash style" do
    visit arguments_bootstrap_builders_buttons_path
    button = find(".bb-btn")

    expect(button[:class]).to eq "btn btn-default btn-lg bb-btn"
    expect(button.text).to eq "Arguments label"
    expect(button[:href]).to eq "/arguments/url"
    expect(button["data-confirm"]).to eq "Are you sure?"
    expect(page).to have_http_status(:success)
    expect(current_path).to eq arguments_bootstrap_builders_buttons_path
  end

  it "#bb_destroy_btn" do
    visit destroy_btn_bootstrap_builders_buttons_path(user_id: user.id)

    button = find(".bb-btn-destroy")
    expect(button[:href]).to eq "/test/destroy"
    expect(button.text).to eq "Delete"
    expect(button[:class]).not_to include "btn-default"

    icon = find(".bb-btn-destroy i")
    expect(icon[:class]).to eq "fa fa-remove"
  end

  it "#bb_edit_btn" do
    visit edit_btn_bootstrap_builders_buttons_path(user_id: user.id)

    button = find(".bb-btn-edit")
    expect(button[:href]).to eq "/test/edit"
    expect(button.text).to eq "Edit"

{'fraction_non_alphanumeric': 0.1302127659574468, 'fraction_numerical': 0.0, 'mean_word_length': 4.189845474613686, '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': '1554294', 'n_tokens_mistral': 774, 'n_tokens_neox': 751, 'n_words': 173}