Commit Graph

703 Commits

Author SHA1 Message Date
José Valim
e5e4d08450 Bring back the helpers tests
Also keep the hook as other tools may rely on it,
we just don't do anything by default on Rails.
2014-08-05 14:04:30 +02:00
David Heinemeier Hansson
e5632f37f7 A few more tests asserting the presence of helper test stubs 2014-08-03 15:12:27 -07:00
David Heinemeier Hansson
a1ede5a441 Stubs are no longer generated for helpers, so dont test for it 2014-08-03 14:59:24 -07:00
David Heinemeier Hansson
a34b6649d0 Generating stubs for helper tests is overly specific. Most helpers should simply be tested as part of the view thats using them. If you need something beyond that, you can add a test yourself for them 2014-08-03 14:50:50 -07:00
Carlos Antonio da Silva
811604f3f7 Avoid defining the test if it does not need to when not on JRuby 2014-07-30 23:41:19 -03:00
Carlos Antonio da Silva
72c96dea2d Use default argument when testing generators without the need for extra args 2014-07-30 23:41:19 -03:00
Carlos Antonio da Silva
bfc2b23128 Simplify path setup 2014-07-30 23:41:18 -03:00
Carlos Antonio da Silva
9023e3b773 Simplify plugin tests a bit, leave the regexp work for minitest 2014-07-30 23:41:18 -03:00
Carlos Antonio da Silva
c8c8fe98b3 Invert unless..else conditions on JRuby checks 2014-07-30 23:41:18 -03:00
Santiago Pastorino
4efb36e7b4 Revert "Merge pull request #15305 from tgxworld/remove_unnecessary_require"
This reverts commit f632f79b8dcd144408c66a544984b2ba9cf52f87, reversing
changes made to 98c7fe87690ca4de6c46e8f69806e82e3f8af42d.

Closes #16343
2014-07-30 09:46:33 -03:00
Robin Dupret
558f8aa2ee Set Psych as the YAML engine for Rubinius
Since the rubysl-yaml gem doesn't ship with Psych by default because of
its dependency on libyaml, on Rubinius, the default engine is Syck.

However, if we want to be able to run the application safely on
different rubies, we need to make people using Rubinius rely on Psych.

See http://git.io/uuLVag for further information.
2014-07-23 20:05:14 +02:00
Rafael Mendonça França
08754f12e6 Merge branch 'rm-remove-mocha'
Conflicts:
	actionpack/test/abstract_unit.rb
2014-07-19 18:17:13 -03:00
Rafael Mendonça França
fd6aaaa0c3 Stop requiring mocha automatically
We are planning to remove mocha from our test suite because of
performance problems. To make this possible we should stop require mocha
on ActionSupport::TestCase.

This should not affect applications since users still need to add mocha
to Gemfile and this already load mocha.

Added FIXME notes to place that still need mocha removal
2014-07-19 17:35:12 -03:00
Rafael Mendonça França
3121412cf1 Keep quietly and capture undeprecated on your suite 2014-07-15 17:56:27 -03:00
Arun Agrawal
e197fd7f37 Display notice in index.html pages in scaffolded generated views
As we are setting notice in destroy action we should display that

For more information see https://github.com/rails/rails/pull/14044
And https://github.com/rails/jbuilder/pull/191

closes #14044
2014-07-04 16:20:53 +02:00
Lucas Mazza
4b173b8ed9 Add a '--skip-routes' flag for the Controller generator.
This way it is possible to skip the addition of the 'get "foo/bar"' routes when
generating a controller.
2014-06-24 14:06:03 -03:00
Rafael Mendonça França
1056589580 Add a generic --skip-gems options to generator
Also remove --skip-turbolinks.

This option is useful if users want to remove some gems like jbuilder,
turbolinks, coffee-rails, etc that don't have specific options on the
generator.

    rails new my_app --skip-gems turbolinks coffee-rails
2014-06-17 20:35:09 -03:00
Marc Schütz
e3dca3acc6 Add an option to skip installation of Turbolinks 2014-06-14 12:03:09 +02:00
Yves Senn
75f75a8719 Merge pull request #14881 from robin850/patch-19
Swallow bundler exceptions when running tests
2014-06-01 18:23:10 +02:00
Yves Senn
7ba6b75910 bin/setup script to bootstrap applications. 2014-05-30 11:15:56 +02:00
Yves Senn
83cb356093 Merge pull request #15327 from alexbel/replace_double_quotes_with_single_quotes
Replace double quotes with single quotes while adding an entry into Gemfile
2014-05-27 09:27:36 +02:00
alexbel
6aaf4bff18 Replace double quotes with single quotes while adding an entry into Gemfile 2014-05-26 19:08:03 -04:00
Guo Xiang Tan
4ca5a5ea67 Remove unnecessary require of Minitest.
Minitest has already been required when calling Minitest.autorun.
2014-05-24 20:36:05 -07:00
Rafael Mendonça França
31fb1ef536 New applications should be created with json serializer
The fix introduced at 75ba7425f6d235f254c00a45a58f42e88f80301a were
missing this case.

To fix the original issue mentioned at that commit the correct is to
remove update_config_files from the command list since we should not run
both config_files command when creating a new application.

Tests were added to make sure everything is working fine.
2014-05-17 15:46:33 -03:00
Christian Wesselhoeft
75ba7425f6 Fix app generator test hanging. 2014-05-17 09:53:44 -07:00
Josemar Luedke
08b435e1bd Change Gemfile’s double quotes in plugin generator
Since the generated application’s Gemfile is using single quotation marks, it
seems fair to use it on plugin’s Gemfile as well.
2014-05-10 17:56:16 -03:00
Vipul A M
b2437050c8 rename str to string to fix overshadowing of variable 2014-05-07 14:32:27 +05:30
Arun Agrawal
c694c8e25c skip-git should not hit git commands plugin generators 2014-05-02 15:38:58 +02:00
Roman Shmatov
e8c310edf6 Works correctly if git not installed 2014-05-02 15:38:56 +02:00
Robin Dupret
48b3257582 Swallow bundler exceptions when running tests
Let's avoid useless output when testing stuff related to Bundler.
2014-04-27 18:25:16 +02:00
Rafael Mendonça França
7bb8fd2f64 Merge pull request #14646 from deivid-rodriguez/provide_byebug_by_default
Improve debugging support
2014-04-11 13:55:10 -03:00
Matthew Draper
f612c2b052 Move assets precompile (and version) to an initializer
sprockets-rails 2.1 needs the precompile list to be available in all
environments.
2014-04-11 22:47:54 +09:30
David Heinemeier Hansson
4b0c8a9467 Use short-form for the scaffold render calls and drop the needless test 2014-04-08 20:57:24 +02:00
David Rodríguez de Dios
d8a4e48220 Update Gemfile templates to provide correct debugger 2014-04-08 20:57:12 +02:00
Rafael Mendonça França
8a081db357 Fix build with bundler 1.6 2014-03-26 22:19:29 -03:00
Kuldeep Aggarwal
5a3817cb16 Fix Generation of proper migration when
ActiveRecord::Base.pluralize_table_names = false.

  Previously, generation a migration like this:

      rails g migration add_column_name_to_user name

  would not generating the correct table name.

Fixes #13426.
2014-03-25 20:27:37 +05:30
Rafael Mendonça França
b9440c36dd Check if any sqlite files are not included in the gitignore
If the sqlite file name change in future version we this regexp should
catch
2014-03-24 09:24:47 -03:00
Dmitrii Golub
f42c7eee7e Remove sqlite3 lines from .gitignore if the application is not using sqlite3. 2014-03-24 14:53:38 +04:00
schneems
aa27766e2f better test error messages 2014-03-14 11:40:14 -05:00
Guillermo Iguaran
b0767afac5 Merge pull request #14195 from robin850/issue-14079
Avoid namespacing routes inside engines
2014-02-28 19:26:04 -05:00
Yves Senn
14e697cf2a Merge pull request #14174 from kuldeepaggarwal/fix-resource_generator_test
fix test cases
2014-02-27 18:57:45 +01:00
Kuldeep Aggarwal
adff19cc3b modify model generator warning message. refs [#174c9f0] 2014-02-27 22:04:01 +05:30
Robin Dupret
fc61bca31d Avoid namespacing routes inside engines
Since #11544, invoking the controller generator, any generated route is
namespaced according to the class_path method. Since a mountable plugin
is namespaced, creating a controller inside would generate a namespaced
route based on the engine's name.

The controller generator now relies on regular_class_path which does not
contain the class hierarchy but the given path.

Fixes #14079.
2014-02-26 16:06:11 +01:00
Carlos Antonio da Silva
1d298bd621 Remove inclusion of rubysl gem for rbx on generated Gemfile
From #14026:

    Specific rbx-2 to limit testing on Rubinius 2.x (since there will be
    other versions of Rubinius > 2.x soon).

    Also, as of Rubinius 2.2.5, it is no longer necessary to bundle the
    rubysl gem.

This is what Rails master/4.1 supports, so we don't need to add rubysl to
gemfiles anymore.
2014-02-25 21:54:29 -03:00
Spencer Rogers
ad75539a0c [skip ci] Fix test name typo in app generator tests. 2014-02-25 17:25:41 -05:00
Yves Senn
b5c6c31dba build fix. follow up to 174c9f0df39cd338a4871f82794256cc64f68a81 2014-02-24 10:09:56 +01:00
Yves Senn
174c9f0df3 include names in model generator warning message. refs #13515.
This is a follow up to #13515. It includes the name given and
the singularized version in the warning message. This will aide the user
to see wether the detected singular was right or not.
2014-02-24 09:45:24 +01:00
Kuldeep Aggarwal
de8bef9878 Add warning when user tried to create model with pluralize name.
1. Generate model with correct_name.
  2. It will help new users to avoid mistakes when tried to create model with wrong name.
2014-02-23 13:10:41 +05:30
Aaron Patterson
22a1a5ac8c remove railties changes. fixes #14054
Squashed commit of the following:

commit 96991e8e919edfb20cc4120bca4e36ed51175d57
Author: Aaron Patterson <aaron.patterson@gmail.com>
Date:   Fri Feb 14 11:29:24 2014 -0800

    Revert "gems can be added or skipped from the template"

    This reverts commit 8beb42cfbc41753ae4dbb91e16abcd1fb7d00356.

    Conflicts:
    	railties/lib/rails/generators/rails/app/app_generator.rb
    	railties/test/generators/app_generator_test.rb

commit 35599c0e657245ef14ac0f28c9189ad16acf40e6
Author: Aaron Patterson <aaron.patterson@gmail.com>
Date:   Fri Feb 14 11:26:53 2014 -0800

    Revert "oops, template replay needs to happen after bundle. :orz:"

    This reverts commit 9104702be61253f9448ca070a22fc86bb4299555.

    Conflicts:
    	railties/lib/rails/generators/rails/app/app_generator.rb

commit f519c3902c313db8e906a49251c91643b8e6499e
Author: Aaron Patterson <aaron.patterson@gmail.com>
Date:   Fri Feb 14 11:25:51 2014 -0800

    Revert "only ask for these ivars if the target responds to them"

    This reverts commit 656d412546cd97d5660c634c2a41c799d3f9e211.

commit aa524a9428e3e4c45fe221f10a66a08efb827ab5
Author: Aaron Patterson <aaron.patterson@gmail.com>
Date:   Fri Feb 14 11:25:39 2014 -0800

    Revert "refactor generator tests to use block form of Tempfile"

    This reverts commit 65251820ef0ab7f3cffb38130de3dd41af8d72be.

commit 7d3740549fa4dfa62e3761f8d4bc6d6d441256e7
Author: Aaron Patterson <aaron.patterson@gmail.com>
Date:   Fri Feb 14 11:25:25 2014 -0800

    Revert "add a more restricted codepath for templates fixes #13390"

    This reverts commit 2875b4a66e38e4333da887a4afbed33358999298.

commit 525df0af1001918986cdfce59539fd2d52c4f32c
Author: Aaron Patterson <aaron.patterson@gmail.com>
Date:   Fri Feb 14 11:25:11 2014 -0800

    Revert "add a send so `apply` can be called.  Fixes #13510"

    This reverts commit c5034d60dba0cd31a6a8c612ee35d63b8127793a.
2014-02-14 11:38:26 -08:00
Kassio Borges
aae455f636 fix path shown in mailer's templates 2014-02-14 14:17:12 -02:00