Commit Graph

2905 Commits

Author SHA1 Message Date
Jon Moss
fa69b2c035 ARGV.shift before calling Rails generators
Gems like rspec-rails depend on `ARGV` being shifted, and `scaffold`
(for example) not being the first item in `ARGV`. This should allow
rspec-rails to be passing on Rails master.
2016-12-17 14:01:25 -05:00
Rafael França
ddf81c5aa5 Merge pull request #27042 from kirs/yaml-schema-cache
Schema cache in YAML
2016-12-13 11:59:45 -05:00
Yuji Yaginuma
23f99ed7eb fix broken tests (#27308)
Follow up to 0d20530e5edfd7d00fbc2a38ef5f87eca6ccc924
2016-12-08 19:08:13 -08:00
Yuji Yaginuma
fbd33b911a specify skip_yarn option in API-only Application (#27309) 2016-12-08 19:07:40 -08:00
David Heinemeier Hansson
0d20530e5e Make Yarn the default, drop default vendor/asset directories (#27300) 2016-12-08 10:33:23 -08:00
David Heinemeier Hansson
3dac36bd8e Yarn: Move node_modules, package.json, and yarn.lock file to vendor (#27245)
Move node_modules, package.json, and yarn.lock file to vendor
2016-12-01 18:51:43 +01:00
Guillermo Iguaran
43e42ad385 Merge pull request #26836 from Liceth/npm
Add Yarn support in new apps using --yarn option
2016-11-29 10:04:47 -05:00
Guillermo Iguaran
ffb81ad6e3 rails-ujs is now shipped with Action View 2016-11-29 09:48:19 -05:00
Liceth Ovalles
e6730c7ffb Add node_modules path to assets load paths when --yarn option is used 2016-11-28 12:11:07 -05:00
Liceth Ovalles
89822e86d8 Add package.json for Yarn if --yarn option is added 2016-11-28 12:10:56 -05:00
Kir Shatrov
4c00c6ed23 Use YAML to serialize schema cache 2016-11-27 22:09:58 -05:00
yuuji.yaginuma
93b7816eef use correct variable in BacktraceCleaner test
`@target_dir` variable was changed to local variable in 8e1714b.
2016-11-26 10:55:11 +09:00
Rafael França
6c873236d4 Merge pull request #27140 from supercaracal/fix-force-ssl-if-session-store-disabled
Fix a force ssl redirection bug that occur when session store disabled.
2016-11-25 10:55:03 +01:00
Fumiaki MATSUSHIMA
f0a55a7c6a [ci skip] MiniTest -> Minitest
MiniTest was renamed to Minitest.
Already renamed on https://github.com/rails/rails/pull/13366
But slipped into on https://github.com/rails/rails/pull/18413/files#diff-6bb90a693835b0e92910b796c8b0ef59R27
2016-11-24 18:46:28 +09:00
Taishi Kasuga
da1453e6ba Remove aggressive unit test with mock. And add integration level test. 2016-11-24 14:17:13 +09:00
Guillermo Iguaran
a865e3b262 Don't add jQuery by default in new apps and use rails-ujs as UJS adapter instead 2016-11-21 18:58:05 -05:00
Isaac Sloan
7102c6ce89 deep symbolize keys on secrets.yml 2016-11-21 16:12:45 -07:00
Kasper Timm Hansen
5aea0952e7 Pass rails runner args onto file again.
When making the new command insfrastructure I had missed that
`bin/rails runner some_file.rb some args` would pass the extra
args onto the file in `ARGV`.

Now fixed by allowing the command to take extra args again, and
make sure to remove the file name from `ARGV`.
2016-11-20 16:02:39 +01:00
Prathamesh Sonpatki
b945c9ad62
Add missing test for singular resource output in rake routes
- This test was present in https://github.com/rails/rails/pull/27089
  but not present on master, may be removed in merge commit?
- There was discussion about moving this to `application/rake_test` so
  may be this happened in merge commit.
- https://github.com/rails/rails/pull/27089#discussion_r88731157
2016-11-19 16:24:28 +05:30
Rafael Mendonça França
ff2fe014d9
Merge pull request #27089 from erickueen/erickueen_fix_26606
Fix incorrect output from rails routes when using singular resources …
2016-11-18 17:38:35 -05:00
Erick Reyna
c79848e1e7 Fix incorrect output from rails routes when using singular resources issue #26606
Rails routes (even rake routes in previous versions) output showed incorrect routes when an application use resource :controller, implying that edit_controller_path match with controller#show.
The order of the output has changed to correct this. View #26606 for more information.

Added a test case, change unit test in rake to expect the new output.
Since the output of resource :controller is changing, the string spected of the railties/test/application/rake_test.rb test_rails_routes_with_controller_environment had to be modified.
2016-11-18 15:12:13 -06:00
Tsukuru Tanimichi
592c06d7cb Add :skip_sprockets to Rails::PluginBuilder::PASSTHROUGH_OPTIONS
`rails plugin new` with `--full` and `--skip-sprockets` options generates a dummy application that throws `NoMethodError`.

```
% rails plugin new my_engine -S --full --skip-gemspec
% cd my_engine
% bin/rails test
rails aborted!
NoMethodError: undefined method `assets' for #<Rails::Application::Configuration:0x007f83aa1e6100>
```
2016-11-14 20:56:49 +09:00
Sean Griffin
d2e84fa919 Add test for #25248 2016-11-12 15:10:59 -05:00
Bouke van der Bijl
de08be6af6
Don't put db:migrate and db:setup in binfiles if activerecord is excluded 2016-11-01 14:29:29 -04:00
Rafael Mendonça França
fe1f4b2ad5
Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
yuuji.yaginuma
5b54a90410 remove assets config from new_framework_defaults if --skip-sprockets is true
If `sprockets` is not loaded, `Rails.application.config.assets` is not defined.
2016-10-25 07:58:05 +09:00
Aaron Patterson
797f1dd63c
Prevent the test framework from being loaded in production mode
The test framework should not be autoloaded in production mode.  Before
this commit, the testing railtie would extend AS::TestCase.  This caused
AS::TestCase to be preloaded regardless of the environment in which we
were running.

This commit just moves the code that adds line filtering support in to
the test command where we actually execute the test runner.  That allows
us to maintain the line runner feature but only load the minimal amount
of code we need.
2016-10-21 13:10:26 -07:00
José Gomes Júnior
1b7263143a don't create db directory when skip active_record 2016-10-21 10:51:31 -02:00
Rafael Mendonça França
fda5afeb79
Remove deprecated code in ssl middleware 2016-10-10 01:35:59 -03:00
Rafael Mendonça França
79a5ea9ead
Remove deprecated support to :text in render 2016-10-10 00:02:52 -03:00
yuuji.yaginuma
1269795ae2 use active_support/testing/autorun in bin/test script
29f0fbd5db643b885665e4a14c7de3bf6c0d9c96 has changed that always call
`Minitest.autorun` in `active_support/testing/autorun`.

Therefore, when used directly `Minitest.run`, tests are performed twice.
2016-09-27 19:34:58 +09:00
Kasper Timm Hansen
d5457af76f Fix server command tests. 2016-09-25 21:31:46 +02:00
Kasper Timm Hansen
0fd5377a36 Fix dbconsole tests. 2016-09-25 21:31:46 +02:00
Kasper Timm Hansen
efd808755c Fix console tests. 2016-09-25 21:31:45 +02:00
Kasper Timm Hansen
6813edc7d9 Initial command structure. 2016-09-25 21:31:35 +02:00
Arthur Nogueira Neves
0ce117fac3 Merge pull request #26515 from grosser/grosser/after_run
support minitest after_run
2016-09-23 23:28:37 -04:00
yuuji.yaginuma
05fa6f3db6 use rails command in restart task test 2016-09-19 10:17:30 +09:00
Michael Grosser
a9aed2ac94
improve error message when include assertions fail
assert [1, 3].includes?(2) fails with unhelpful "Asserting failed" message

assert_includes [1, 3], 2 fails with "Expected [1, 3] to include 2" which makes it easier to debug and more obvious what went wrong
2016-09-16 12:03:37 -07:00
Michael Grosser
45dce0c003
support minitest after_run for parity to regular minitest
see f9605387e4/lib/minitest.rb (L51-L65)
2016-09-16 09:36:29 -07:00
Michael Grosser
fe98d21289
improve test coverage 2016-09-16 09:34:34 -07:00
Rafael França
1381873fd7 Merge pull request #26469 from y-yagi/remove_useless_option
remove useless `gemfile` option
2016-09-14 18:09:48 -03:00
yuuji.yaginuma
9106318fdf fix broken generators test
Follow up to 92703a9ea5d8b96f30e0b706b801c9185ef14f0e
2016-09-14 12:26:56 +09:00
yuuji.yaginuma
f200a52e16 remove useless gemfile option
Rails application for test creates with `--skip-gemfile` option.
https://github.com/rails/rails/blob/master/railties/test/isolation/abstract_unit.rb#L333

Therefore, regardless of the option, Gemfile is not created.
2016-09-12 18:32:07 +09:00
yuuji.yaginuma
99620d1534 use correct Gemfile in bin/setup test
Currently, `bin/setup` test uses Gemfile of Rails. But this Gemfile is not a
file to be used in Rails application.
Add a Gemfile to Rails application that is created for test, it has been
modified to use the Gemfile.
2016-09-11 11:03:01 +09:00
Xavier Noria
bb1ecdcc67 fixes remaining RuboCop issues [Vipul A M, Xavier Noria] 2016-09-01 23:41:49 +02:00
schneems
70dd041f35 Fix style 2016-08-30 15:04:23 -05:00
schneems
3ee9d0061f Address comment via @dhh, better option naming 2016-08-30 10:26:13 -05:00
schneems
a7256c30ae Thanks rubocop 2016-08-29 13:16:07 -05:00
schneems
b47970294e Favor public_folder: true over public_*
Adding all those `public_*` methods is a bit heavy handed, we can change the API to instead  use `public_folder: true`. Change was pretty easy since it was already implemented that way.
2016-08-29 13:16:07 -05:00
schneems
a22164a282 Fix formatting 2016-08-29 13:16:07 -05:00