Skip to content

Commit

Permalink
Merge pull request #1595 from plataformatec/frg-fix-ci
Browse files Browse the repository at this point in the history
Remove `gem update --system` before install on CI
  • Loading branch information
feliperenan committed Aug 6, 2018
2 parents 3a99d65 + 71a95b9 commit 1fe6c8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Expand Up @@ -50,9 +50,6 @@ matrix:
- rvm: 2.1.10
gemfile: gemfiles/Gemfile.rails-5-2-stable # rack 2.0.1 requires Ruby version >= 2.2.2

before_install:
- gem update --system

notifications:
email: false
slack:
Expand Down
6 changes: 3 additions & 3 deletions test/form_builder/input_field_test.rb
Expand Up @@ -79,13 +79,13 @@ class InputFieldTest < ActionView::TestCase
test 'builder input_field infers pattern from attributes' do
with_input_field_for @other_validating_user, :country, as: :string, pattern: true

assert_select 'input[pattern="\w+"]'
assert_select "input:match('pattern', ?)", /\w+/
end

test 'builder input_field accepts custom pattern' do
with_input_field_for @other_validating_user, :country, as: :string, pattern: '\d+'

assert_select 'input[pattern="\d+"]'
assert_select "input:match('pattern', ?)", /\\d+/
end

test 'builder input_field uses readonly component' do
Expand Down Expand Up @@ -132,7 +132,7 @@ class InputFieldTest < ActionView::TestCase
swap_wrapper :default, custom_wrapper_with_html5_components do
with_input_field_for @user, :name, pattern: '\w+'

assert_select 'input[pattern="\w+"]'
assert_select "input:match('pattern', ?)", /\w+/
end
end

Expand Down
6 changes: 3 additions & 3 deletions test/inputs/string_input_test.rb
Expand Up @@ -88,12 +88,12 @@ class StringInputTest < ActionView::TestCase

test 'input infers pattern from attributes' do
with_input_for @other_validating_user, :country, :string, pattern: true
assert_select 'input[pattern="\w+"]'
assert_select "input:match('pattern', ?)", /\w+/
end

test 'input infers pattern from attributes using proc' do
with_input_for @other_validating_user, :name, :string, pattern: true
assert_select 'input[pattern="\w+"]'
assert_select "input:match('pattern', ?)", /\w+/
end

test 'input does not infer pattern from attributes if root default is false' do
Expand All @@ -105,7 +105,7 @@ class StringInputTest < ActionView::TestCase

test 'input uses given pattern from attributes' do
with_input_for @other_validating_user, :country, :string, input_html: { pattern: "\\d+" }
assert_select 'input[pattern="\d+"]'
assert_select "input:match('pattern', ?)", /\\d+/
end

test 'input does not use pattern if model has :without validation option' do
Expand Down

0 comments on commit 1fe6c8e

Please sign in to comment.