<commit_before>require 'spec_helper'

describe 'Gifts' do
	subject { page }
	let(:user) { create :user, nickname: "akira" }

	describe 'multiple giftings of a pull request' do
		before do
			login(user)
			visit new_gift_path
		end

		let(:pull_request) { create(:pull_request, user: user, title: 'Example Pull Request') }
		let(:gift) { create(:gift, user: user, pull_request: pull_request) }

		it 'should not have any pull requests available' do
			should_not have_xpath "//option[contains(text(), '#{pull_request.title}')]"

			click_on "Gift it!"

			should_not have_xpath "//option[contains(text(), '#{pull_request.title}')]"<commit_msg>Updated spec.<commit_after>require 'spec_helper'

describe 'Gifts' do
	subject { page }
	let(:user) { create :user, nickname: "akira" }

	describe 'multiple giftings of a pull request' do
		before do
			login(user)
			visit new_gift_path
		end

		let(:pull_request) { create(:pull_request, user: user, title: 'Example Pull Request') }
		let(:gift) { create(:gift, user: user, pull_request: pull_request) }

		it 'should not have any pull requests available' do
			should_not have_xpath "//option[contains(text(), 'Gifted')]"

			click_on "Gift it!"

			should_not have_xpath "//option[contains(text(), 'Gifted')]"
{'fraction_non_alphanumeric': 0.13455414012738853, 'fraction_numerical': 0.0, 'mean_word_length': 4.846511627906977, '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': '6315733', 'n_tokens_mistral': 466, 'n_tokens_neox': 415, 'n_words': 120}