Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

commit_button_helper_spec failing #637

Closed
betelgeuse opened this Issue · 8 comments

4 participants

@betelgeuse
betelgeuse@pena /mnt/checkouts/formtastic $ bundle exec rake
(in /mnt/checkouts/formtastic)
/usr/bin/ruby18 -S bundle exec rcov -Ispec:lib --exclude gems/*,spec/*,.bundle/*, --aggregate coverage.data spec/i18n_spec.rb spec/inputs/datetime_input_spec.rb spec/inputs/include_blank_spec.rb spec/inputs/string_input_spec.rb spec/inputs/range_input_spec.rb spec/inputs/radio_input_spec.rb spec/inputs/numeric_input_spec.rb spec/inputs/text_input_spec.rb spec/inputs/number_input_spec.rb spec/inputs/custom_input_spec.rb spec/inputs/label_spec.rb spec/inputs/placeholder_spec.rb spec/inputs/search_input_spec.rb spec/inputs/boolean_input_spec.rb spec/inputs/check_boxes_input_spec.rb spec/inputs/phone_input_spec.rb spec/inputs/select_input_spec.rb spec/inputs/password_input_spec.rb spec/inputs/time_input_spec.rb spec/inputs/hidden_input_spec.rb spec/inputs/country_input_spec.rb spec/inputs/file_input_spec.rb spec/inputs/email_input_spec.rb spec/inputs/time_zone_input_spec.rb spec/inputs/url_input_spec.rb spec/inputs/date_input_spec.rb spec/helpers/buttons_helper_spec.rb spec/helpers/input_helper_spec.rb spec/helpers/commit_button_helper_spec.rb spec/helpers/form_helper_spec.rb spec/helpers/reflection_helper_spec.rb spec/helpers/semantic_errors_helper_spec.rb spec/helpers/inputs_helper_spec.rb spec/builder/semantic_fields_for_spec.rb spec/builder/custom_builder_spec.rb spec/builder/error_proc_spec.rb spec/builder/errors_spec.rb
.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F..................................................................................................................                                                                                                                                    

Failures:

  1) Formtastic::FormBuilder#commit_button label when used on an existing record when no explicit label is provided when no I18n-localized label is provided should render an input with default I18n-localized label (fallback)
     Failure/Error: output_buffer.should have_tag('li.commit input[@value="Save Post"][@class~="update"]')
       expected
       <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
       <html><body><form accept-charset="UTF-8" action="/posts/1" class="formtastic post" id="edit_post" method="post" novalidate="novalidate">
       <div style="margin:0;padding:0;display:inline">
       <input name="utf8" type="hidden" value="&#10003;"><input name="_method" type="hidden" value="put">
       </div>
       <li class="commit button"><input class="update" id="post_submit" name="commit" type="submit" value="Update Post"></li>
       </form></body></html>

       to have an element matching "li.commit input[@value=\"Save Post\"][@class~=\"update\"]", but did not
     # ./spec/helpers/commit_button_helper_spec.rb:348

Finished in 78.87 seconds
1200 examples, 1 failure

Failed examples:

rspec ./spec/helpers/commit_button_helper_spec.rb:344 # Formtastic::FormBuilder#commit_button label when used on an existing record when no explicit label is provided when no I18n-localized label is provided should render an input with default I18n-localized label (fallback)                                                                                                                                                                         
rake aborted!
ruby -S bundle exec rcov -Ispec:lib --exclude gems/*,spec/*,.bundle/*, --aggregate coverage.data spec/i18n_spec.rb spec/inputs/datetime_input_spec.rb spec/inputs/include_blank_spec.rb spec/inputs/string_input_spec.rb spec/inputs/range_input_spec.rb spec/inputs/radio_input_spec.rb spec/inputs/numeric_input_spec.rb spec/inputs/text_input_spec.rb spec/inputs/number_input_spec.rb spec/inputs/custom_input_spec.rb spec/inputs/label_spec.rb spec/inputs/placeholder_spec.rb spec/inputs/search_input_spec.rb spec/inputs/boolean_input_spec.rb spec/inputs/check_boxes_input_spec.rb spec/inputs/phone_input_spec.rb spec/inputs/select_input_spec.rb spec/inputs/password_input_spec.rb spec/inputs/time_input_spec.rb spec/inputs/hidden_input_spec.rb spec/inputs/country_input_spec.rb spec/inputs/file_input_spec.rb spec/inputs/email_input_spec.rb spec/inputs/time_zone_input_spec.rb spec/inputs/url_input_spec.rb spec/inputs/date_input_spec.rb spec/helpers/buttons_helper_spec.rb spec/helpers/input_helper_spec.rb spec/helpers/commit_button_helper_spec.rb spec/helpers/form_helper_spec.rb spec/helpers/reflection_helper_spec.rb spec/helpers/semantic_errors_helper_spec.rb spec/helpers/inputs_helper_spec.rb spec/builder/semantic_fields_for_spec.rb spec/builder/custom_builder_spec.rb spec/builder/error_proc_spec.rb spec/builder/errors_spec.rb failed

(See full trace by running task with --trace)
@sobrinho
Collaborator

Could you provide a fix?

@betelgeuse

The output says "Update Post" and the test expects "Save Post". I didn't look into which one is correct and don't have time for in the near future.

@sobrinho
Collaborator

"Save Post" is the right label in this case.

I didn't find a quickly fix here.

@justinfrench, do you know something about that?

@nashby

@betelgeuse, what version of Ruby are you using?
It's works for me with:

  • 1.9.2-p180
  • 1.8.7-p334
  • ree-1.8.7-2011.03
@betelgeuse

@nashby ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-linux]

@justinfrench

There's a different but related failing spec on Travis CI, so clearly something isnt 100% solid. My first guess is doffing i18n versions.

@betelgeuse

@justinfrench I used bundle exec rake so the version locked by Gemfile.lock should get used. i18n seems to be currently at 0.5.0

@justinfrench

Travis is green for 1.8.7 now so it's only you sorry @betelgeuse, not sure what else I can do to help. Closing for now, but will happily accept a patch, of course! http://travis-ci.org/#!/justinfrench/formtastic/builds/80889

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.