<commit_before>require "spec_helper"

describe HungryForm::TextField do
  it_behaves_like "an active element" do
    let(:active_element_options) { {} }
  end
end<commit_msg>Do not include into to_hash nil params<commit_after>require "spec_helper"

describe HungryForm::TextField do
  it_behaves_like "an active element" do
    let(:active_element_options) { {} }
  end

  let(:resolver) { HungryForm::Resolver.new({}) }
  let(:group) { HungryForm::Group.new(:group, nil, resolver, {}) {} }
  let(:element_options) { {} }
  subject { described_class.new(:element_name, group, resolver, element_options) {} }

  describe "#to_json" do
  	it "should return a json string" do
  		expect(subject.to_json).to eq '{"group_element_name": {"visible": "true"}}'
		end
	end
end
{'fraction_non_alphanumeric': 0.13428943937418514, 'fraction_numerical': 0.0, 'mean_word_length': 5.2439024390243905, 'pattern_counts': {'":': 2, '<': 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': '5303033', 'n_tokens_mistral': 262, 'n_tokens_neox': 254, 'n_words': 60}