<commit_before>require "spec_helper"

describe BootstrapForm::Datetimepicker do
  let(:schedule) { Schedule.new }
  let(:builder) { BootstrapForm::FormBuilder.new(:schedule, schedule, self, {}) }
  let(:horizontal_builder) { BootstrapForm::FormBuilder.new(:schedule, schedule, self, { layout: :horizontal }) }

  it "should render datetimepicker correctly in normal layout" do
    expected = <<-HTML.gsub(/ *\n */, "")
<div class="form-group">
  <label class="control-label" for="schedule_until">Until</label>
  <div class="bootstrap_form-datetimepicker input-group date" data-date-format="YYYY-MM-DD HH:mm:ss">
    <input class="form-control" id="schedule_until" name="schedule[until]" type="text" />
    <span class="input-group-addon">
      <span class="glyphicon glyphicon-calendar">
      </span>
    </span>
  </div>
</div>
    HTML<commit_msg>Update specs to enable template to detect schedule instance<commit_after>require "spec_helper"

describe BootstrapForm::Datetimepicker do
  before { @schedule = Schedule.new }
  let(:builder) { BootstrapForm::FormBuilder.new(:schedule, @schedule, self, {}) }
  let(:horizontal_builder) { BootstrapForm::FormBuilder.new(:schedule, @schedule, self, { layout: :horizontal }) }

  it "should render datetimepicker correctly in normal layout" do
    expected = <<-HTML.gsub(/ *\n */, "")
<div class="form-group">
  <label class="control-label" for="schedule_until">Until</label>
  <div class="bootstrap_form-datetimepicker input-group date" data-date-format="YYYY-MM-DD HH:mm:ss">
    <input class="form-control" id="schedule_until" name="schedule[until]" type="text" />
    <span class="input-group-addon">
      <span class="glyphicon glyphicon-calendar">
      </span>
    </span>
  </div>
</div>
    HTML
{'fraction_non_alphanumeric': 0.161345496009122, 'fraction_numerical': 0.0, 'mean_word_length': 4.989761092150171, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 25, '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': '3942812', 'n_tokens_mistral': 544, 'n_tokens_neox': 526, 'n_words': 118}