Ran
|
Jobs
12
|
Files
28
|
Run time
5min
|
Badge
Embed ▾
README BADGES
|
push
travis-ci
Make conditionals more inline with guides The Ruby on Rails guide contains the following example ``` class Computer < ApplicationRecord validates :mouse, presence: true, if: ["market.retail?", :desktop?], unless: Proc.new { |c| c.trackpad.present? } end ``` Arrays and Strings were not supported before. https://github.com/rails/rails/blob/38fe5ae24/activesupport/lib/active_support/callbacks.rb#L429-L458 was used for inspiration. Initially I handled a Symbol case, and raised an error if something unexpected is passed, but that creates more than 100 lines in the module, and rubocop complains. So I kept the code sending a message if something other than a Proc or a String is passed.
10 of 10 new or added lines in 1 file covered. (100.0%)
583 of 585 relevant lines covered (99.66%)
257.39 hits per line
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 530.1 (2.0.0, gemfiles/rails_4.0.gemfile) | 28 |
99.48 |
Travis Job 530.1 | |
2 | 530.2 (2.0.0, gemfiles/rails_4.1.gemfile) | 28 |
99.48 |
Travis Job 530.2 | |
3 | 530.3 (2.0.0, gemfiles/rails_4.2.gemfile) | 28 |
99.48 |
Travis Job 530.3 | |
4 | 530.4 (2.1.10, gemfiles/rails_4.0.gemfile) | 28 |
99.48 |
Travis Job 530.4 | |
5 | 530.5 (2.1.10, gemfiles/rails_4.1.gemfile) | 28 |
99.48 |
Travis Job 530.5 | |
6 | 530.6 (2.1.10, gemfiles/rails_4.2.gemfile) | 28 |
99.48 |
Travis Job 530.6 | |
7 | 530.7 (2.2.6, gemfiles/rails_4.0.gemfile) | 28 |
99.48 |
Travis Job 530.7 | |
8 | 530.8 (2.2.6, gemfiles/rails_4.1.gemfile) | 28 |
99.48 |
Travis Job 530.8 | |
9 | 530.9 (2.2.6, gemfiles/rails_4.2.gemfile) | 28 |
99.48 |
Travis Job 530.9 | |
10 | 530.10 (2.3.2, gemfiles/rails_4.0.gemfile) | 28 |
99.49 |
Travis Job 530.10 | |
11 | 530.11 (2.3.2, gemfiles/rails_4.1.gemfile) | 28 |
99.49 |
Travis Job 530.11 | |
12 | 530.12 (2.3.2, gemfiles/rails_4.2.gemfile) | 28 |
99.49 |
Travis Job 530.12 |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|