Commit Graph

146 Commits

Author SHA1 Message Date
Daniel Colson f88f5a457c Add custom RuboCop for `assert_not` over `refute`
Since at least cf4afc4 we have preferred `assert_not` methods over
`refute` methods. I have seen plenty of comments in PRs about this,
and we have tried to fix it a few times (5294ad8, e45f176, 8910f12,
41f50be, d4cfd54, 48a183e, and 211adb4), but the `refute` methods
keep sneaking back in.

This custom RuboCop will take care of enforcing this preference, so we
don't have to think about it again. I suspect there are other similar
stylistic preferences that could be solved with some custom RuboCops, so
I will definitely keep my eyes open. `assert_not` over `assert !` might
be a good candidate, for example.

I wasn't totally sure if `ci/custom_cops` was the best place to put
this, but nothing else seemed quite right. At one point I had it set up
as a gem, but I think custom cops like this would have limited value
in another context.

I want to see how code climate handles the new cops before
autocorrecting the existing violations. If things go as expected, I will
push another commit with those corrections.
2018-04-03 22:35:34 -04:00
Matthew Draper f1a30d8ad5 Only run isolated tests on the latest stable ruby: that's now 2.5 2018-01-25 09:55:10 +10:30
eileencodes 93d7b07549 Fix ActionView UJS build
The UJS build has been failing with Chrome failed to start. This commit
fixes it by adding the option `--no-sandbox`. Travis removed the sanbox
option which is why Chrome crashes.

Ref https://github.com/travis-ci/travis-ci/issues/8836

Example failure: https://travis-ci.org/rails/rails/jobs/330396750
2018-01-18 11:28:12 -05:00
Fatos Morina 37cf9b3466 Fix typos and add a few suggestions 2017-11-28 19:27:43 +01:00
Matthew Draper f50aeba01e Keep rubocop happy with the new Selenium runner 2017-10-28 22:44:06 +10:30
Guillermo Iguaran 734f981782 Count assertions instead of tests in report 2017-10-19 11:11:20 -05:00
Guillermo Iguaran 4dcf12a340 PhantomJS is abandoned, replace it with Selenium/Chrome headless 2017-10-19 11:01:52 -05:00
Koichi ITO 0ea00bb5b0 Use frozen string literal in ci/ 2017-08-13 22:07:54 +09:00
George Claghorn e43ba973a3 Run Active Storage tests in CI (#30144) 2017-08-10 15:58:30 -04:00
Kazuhiro NISHIYAMA 7f89d4e8bf Use File::NULL instead of "/dev/null" 2017-07-31 21:58:42 +09:00
Ryuta Kamizono 249a982a25 Create `rails@localhost` user on travis ci
Looks like that latest CI failure is due to missing `rails@localhost`.
Creating the user may solve the issue.

https://travis-ci.org/rails/rails/jobs/254996063#L831
2017-07-19 10:18:00 +09:00
Matthew Draper 87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Matthew Draper 22deb92216 Skip isolated test runs on older rubies 2017-03-23 03:51:03 +10:30
Rafael Mendonça França fe4a5706ac
Test rails-ujs in our travis matrix 2017-02-22 13:49:28 -05:00
eileencodes 1a0ca84a06 Move and rename system tests
* Move system tests back into Action Pack
* Rename `ActionSystemTest` to `ActionDispatch::SystemTestCase`
* Remove private base module and only make file for public
`SystemTestCase` class, name private module `SystemTesting`
* Rename `ActionSystemTestCase` to `ApplicationSystemTestCase`
* Update corresponding documentation and guides
* Delete old `ActionSystemTest` files
2017-02-20 15:07:35 -05:00
eileencodes 5bf0aa6745 Turn system testing into it's own gem and rename
Renames `Rails::SystemTestCase` to `ActionSystemTest` and moves it to a
gem under the Rails name.

We need to name the class `ActionSystemTestCase` because the gem expects
a module but tests themselves expect a class.

Adds MIT-LICENSE, CHANGELOG, and README for the future.
2017-02-20 15:07:33 -05:00
Rafael Mendonça França fe1f4b2ad5
Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
Xavier Noria 80e66cc4d9 normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
Xavier Noria 60b67d76dc modernizes hash syntax in the rest of the project 2016-08-06 19:40:54 +02:00
Xavier Noria 8b4e6bf233 applies new string literal convention in ci
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:21:29 +02:00
Jon Moss 8cfce058d9
CI: run Action Cable browser tests in Sauce Labs
Allow failures until test runs are consistently stable, not hanging.

Closes #24943.

Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
2016-05-25 09:21:28 -07:00
Anubhav Saxena 41c685608b Minor comment language correction. 2016-05-24 22:42:49 +05:30
Joe Rafaniello d2660c8cad Fix some typos in comments.
[ci skip]
2016-05-04 12:22:23 -04:00
Ryuta Kamizono 210c81440a Remove commented out code in `ci/travis.rb` [ci skip] 2016-02-04 09:15:25 +09:00
yui-knk bf8ca88b91 Use an appropriate rebuild task on Travis
Use `db:mysql:rebuild` when testing mysql2,
`db:postgresql:rebuild` when testing postgresql
and no rebuild task when testing others.
2015-12-22 00:55:13 +09:00
Rafael Mendonça França f1ba5869ca Do not run action cable tests in isolation
We don't have isolation tests for it yet.
2015-12-14 16:02:31 -02:00
Rafael Mendonça França a0e4d5e335 Add Action Cable tests to travis matrix 2015-12-14 14:44:51 -02:00
Godfrey Chan 9d7d12c004 Partially revert 14b20ce
The failure have returned, so disabling the tests again. (The upgrade is
fine to keep.)
2015-11-27 01:32:38 -08:00
Godfrey Chan 14b20ce9b3 Upgrade to listen 3.0.5, re-enable tests
In listen 3.0.4 and below, the `#stop` method on the notification
backends are a no-op, meaning that we are leaking them per test. This
ended up triggering another bug in Ruby that causes our builds to fail
randomly on CI.

listen bug: https://github.com/guard/listen/issues/353
ruby bug: https://bugs.ruby-lang.org/issues/11744
2015-11-26 10:35:20 -08:00
Godfrey Chan 71ffd9b521 Only run listen tests in isolation, for now
There is a known issue with the listen tests that casuses files to be
incorrectly GC'ed even when they are still in-use. The current is to
only run them in isolation to avoid randomly failing our test suite.
2015-11-26 02:52:00 -08:00
Roque Pinel 89550bc1a0 Add the bug report templates to the Travis CI build
The bug report templates are now executed from the `ci/travis.rb` when
`GEM` contains `guides`.

I started by creating a `test` task in `guides/Rakefile` to handle this,
but since inline `gemfile` must not be executed with `bundle exec`, that
rake task would not be consistent with others. So I went back by
executing them directly from `Build`.

Use inline Gemfile dependency when reporting gem bugs
2015-06-05 15:29:48 -05:00
Erik Michaels-Ober d1374f99bf Pass symbol as an argument instead of a block 2014-11-29 11:53:24 +01:00
Matthew Draper c7f0cd6a79 Skip isolated tests for PRs
They're valuable, but the types of errors they catch are fairly rare: we
can address them post-merge when they show up.
2014-09-20 19:21:35 +09:30
Cristian Bica 175ba66664 ActiveJob Integration Tests 2014-09-11 00:38:56 +03:00
Cristian Bica 7a1dcfc64f Added ActiveJob configuration for travis 2014-08-14 14:52:02 +03:00
Arun Agrawal da4d841e16 Reorganize ActiveRecord tasks [Arun Agrawal & Abd ar-Rahman Hamidi] 2014-05-16 23:09:05 +02:00
Yves Senn b231825f3e Revert "Merge pull request #14940 from arunagw/hbakhtiyor-test-db-namespaces-ar"
This reverts commit fe98596008, reversing
changes made to add9560643.
2014-05-03 20:08:15 +02:00
Arun Agrawal 2de846852a Reorganize ActiveRecord tasks [Arun Agrawal & Abd ar-Rahman Hamidi] 2014-05-03 19:34:18 +02:00
Łukasz Strzałkowski 1a62369592 Add ActionView to CI 2013-06-20 17:56:00 +02:00
Vipul A M 5b673f3d46 Fix copy table index test; Change == to ! on false in travis.rb 2013-03-21 10:57:52 +05:30
Grace Liu 0c1c0c634b remove duplicate build runs in travis. These extra runs were used to
test identity map and not fully removed when the feature was removed.
2012-07-24 16:44:20 -07:00
Carlos Antonio da Silva a8dd21d8b4 Remove IdentityMap 2012-03-13 20:08:54 -03:00
Prem Sichanugrist f1637bf2bb Remove Active Resource source files from the repository
Dear Active Resource,

It's not that I hate you or anything, but you didn't get much attention lately. There're so many alternatives out there, and I think people have made their choice to use them than you. I think it's time for you to have a big rest, peacefully in this Git repository.

I will miss you,

@sikachu.
2012-03-13 14:55:44 -04:00
Sergey Parizhskiy cc5f68d56b fixed a typo in a message when there is no failuresin a build 2011-11-28 16:45:40 +02:00
Santiago Pastorino 17d0efb679 Remove cruise files 2011-07-26 18:11:03 -03:00
Josh Kalderimis d664eba5b4 Added a .travis.yml config and travis specific ci script.
Don't install ruby-debug if running the test suite on Travis,
linecache19 is the main offender, very very slow.

And do not install pg if Travis is bundling the gems, pg will be setup
on Travis soon.
2011-07-15 10:47:50 +02:00
Santiago Pastorino 20ffd43ab4 Allow CI to use the latest rubygems version 2011-06-30 08:32:53 -03:00
Santiago Pastorino 452922a359 Update CI config 2011-06-30 08:26:25 -03:00
Jon Leighton 445c0607f7 Don't ensure all keys in build_results are only written once, otherwise we get false positive builds reported. 2011-06-06 21:27:29 +01:00