aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
Commit message (Collapse)AuthorAgeFilesLines
* Revert "make new rails apps log to STDOUT"Steve Klabnik2013-03-151-21/+0
| | | | | | This reverts commit b7d9d6e2cd5082d269dafbc0316e2107febe1451. Per discussion with @jeremy and @rubys on Campfire.
* make new rails apps log to STDOUTTerence Lee2013-03-151-0/+21
|
* Add support for generate scaffold password:digestSam Ruby2013-03-131-0/+41
| | | | | | | | | | * adds password_digest attribute to the migration * adds has_secure_password to the model * adds password and password_confirmation password_fields to _form.html * omits password entirely from index.html and show.html * adds password and password_confirmation to the controller * adds unencrypted password and password_confirmation to the controller test * adds encrypted password_digest to the fixture
* Replace assert_(no_)match args from regexps to strings to remove warningsCarlos Antonio da Silva2013-03-111-40/+40
| | | | | | Using regexps as arguments without parentheses end up raising: warning: ambiguous first argument; put parentheses or even spaces
* Make sure that the test case is run under test envPrem Sichanugrist2013-03-111-1/+17
| | | | | | * Unset $RAILS_ENV that got set by abstract_unit to trigger the default. * split out environment setting since Ruby 1.9.3 doesn't support inline ENV setting.
* Fix test failure introduced in 3ed41e57Prem Sichanugrist2013-03-111-5/+3
| | | | I forgot to run the test suit after changing the task name. :bomb:
* Merge pull request #9080 from sikachu/master-rails-testRafael Mendonça França2013-03-112-10/+311
|\ | | | | Add `rails test` command to run the test suite
| * Make sure that `rails test` load test in test envPrem Sichanugrist2013-03-091-1/+44
| |
| * Update Rake tasks to call `rails test` insteadPrem Sichanugrist2013-03-091-10/+13
| | | | | | | | | | Also, print out deprecation warning for other rake tasks except `rake test` and `rake` (default)
| * Improve wording for rails test commandDalibor Nasevic2013-03-091-8/+8
| |
| * Load fixtures only when running suites, or `-f`Prem Sichanugrist2013-03-091-0/+51
| | | | | | | | | | | | * `rails test -f` will run the test suites with all fixtures loaded * New application will now generated without `fixtures :all` line enabled by default.
| * Add support for MiniTest flags in TestRunnerPrem Sichanugrist2013-03-091-0/+21
| | | | | | | | | | Any flags that got set will be passed through to MiniTest::Unit.runner, such as `-n`, `-s-, and `-v`.
| * Add `rails test` command to run the test suitePrem Sichanugrist and Chris Toomey2013-03-091-0/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To run the whole test suite: $ rails test To run the test file(s): $ rails test test/unit/foo_test.rb [test/unit/bar_test.rb ...] To run the test suite $ rails test [models,helpers,units,controllers,mailers,...] For more information, see `rails test --help`. This command will eventually replacing `rake test:*`, and `rake test` command will actually invoking `rails test` instead.
* | Cleanup tests for unused variablesVipul A M2013-03-111-1/+1
|/
* Fix race condition in testJon Leighton2013-03-091-2/+2
| | | | | | | | | | | This should fix travis. For real this time! This is the one! The readpartial(100) meant that an earlier assert_stdout could chomp up the output that a later assert_stdout wants, meaning that the later assertion fails. Reading only 1 byte at a time ensure that we don't read any more than is necessary to verify the assertion.
* Bump up timeoutsJon Leighton2013-03-091-3/+3
| | | | | | This should fix travis. Also ensuring that we don't try to kill when pid is nil.
* Fix failing test regarding console change to fix sandboxingCarlos Antonio da Silva2013-03-081-11/+10
| | | | Introduced in be3e10cd26bc8ec29c6474d03a08a8e733108e7d.
* The console --sandbox transaction should not be joinableJon Leighton2013-03-081-10/+8
| | | | Thanks @neerajdotname for noticing this bug.
* Fix rails console --sandboxJon Leighton2013-03-081-8/+74
| | | | | | I've also added a proper acceptance test which reproduced the issue. Closes #9513, #9515.
* Bring config.allow_concurrency backJosé Valim2013-03-031-0/+6
| | | | | Since the Rack::Lock still exists in development, let's provide a way to disable it explicitly.
* Remove hard coded references to Active Record in railtiesJosé Valim2013-03-021-13/+0
|
* Support creating a table migration generatorSammy Larbi2013-03-011-3/+14
| | | | | | | | | | | | | | | | Sometimes you want to create a table without an associated model and test, which is also not a join table. With this commit, you can now do that. Example: rails g migration create_posts title:string or rails g migration CreatePosts title:string This commit also moves the template the model generator uses for the migration to the migration templates folder, as it seems a more sensible place for it now that it is shared code.
* Ensure plugins generated with plugin new can boot the dummy applicationJosé Valim2013-02-281-39/+16
|
* Improve `rake stats` for JavaScript and CoffeeScript.Hendy Tanata2013-02-251-0/+288
| | | | Ignore block comments and calculates number of functions.
* Merge pull request #9401 from sikachu/master-remove-builder-optionRafael Mendonça França2013-02-2410-169/+0
|\ | | | | Remove `--builder` option from `rails` command
| * Remove `--builder` option from `rails` commandPrem Sichanugrist2013-02-2410-169/+0
| | | | | | | | | | | | | | Ability to use a custom builder by passing `--builder` (or `-b`) has been removed. Consider using application template instead. See this guide for more detail: http://guides.rubyonrails.org/rails_application_templates.html
* | remove AR auto-explain (config.auto_explain_threshold_in_seconds)Yves Senn2013-02-241-9/+0
|/ | | | | | | | | | We discussed that the auto explain feature is rarely used. This PR removes only the automatic explain. You can still display the explain output for any given relation using `ActiveRecord::Relation#explain`. As a side-effect this should also fix the connection problem during asset compilation (#9385). The auto explain initializer in the `ActiveRecord::Railtie` forced a connection.
* Fix backwards compatibility with Rails 3 apps.Steve Klabnik2013-02-221-29/+36
| | | | | | | | | | | | | | | When we removed script/rails and introduced bin/rails, we accidentally introduced a regression. If you install Rails 4 as a gem, then try to do something in a Rails 3 application: $ rails g This will throw the 'please type rails new foo' message rather than the proper generator documentation message. This is because older apps don't have bin/rails. Therefore, we now *prefer* bin/rails, but still search for script/rails, and exec the one we find.
* remove uncommented railties boot_test.rbYves Senn2013-02-211-20/+0
|
* run the load_structure test in the test environmentTerence Lee2013-02-211-3/+10
|
* test DATABASE_URL without database.yml aroundTerence Lee2013-02-211-0/+2
|
* Fix rake routes output in railties testCarlos Antonio da Silva2013-02-191-2/+4
|
* Revert "Deprecate the `eager_load_paths` configuration"Andrew White2013-02-193-30/+38
| | | | | | | | | | | Because of the possibility of lib being unintentionally eager loaded it's been agreed that we'll leave autoload paths and eager load paths separate for Rails 4.0. This reverts commit 0757b3388ffe4f44b60de950d40e18ef05055931. Conflicts: railties/CHANGELOG.md
* editorial tweaksXavier Noria2013-02-191-1/+1
|
* Use strip_heredoc in the tests as well.Steve Klabnik2013-02-181-5/+6
| | | | Thanks @sikachu. :sweat_smile:
* Add message when you have no routes defined.Steve Klabnik2013-02-181-0/+15
| | | | | | Print a message in both `rake routes` and at GET "/rails/info/routes" that lets you know you have no routes defined, as well as linking to the Rails Guide on the topic.
* Gist URLs are now namespacedAkira Matsuda2013-02-181-3/+3
| | | | see: https://github.com/blog/1406-namespaced-gists
* Added notice message for destroy method in scaffoldRahul P. Chaudhari2013-02-101-0/+1
|
* --no-rc in the railties testsAkira Matsuda2013-02-012-2/+2
| | | | so that the tester's local .railsrc file does not affect the test results
* Remove BestStandardsSupport middlewareGuillermo Iguaran2013-01-292-32/+1
|
* Merge pull request #8303 from jeremywrowe/masterRafael Mendonça França2013-01-251-0/+5
|\ | | | | | | | | | | | | Fixes improper database name when creating a new rails app with a '.' Conflicts: railties/CHANGELOG.md
| * Fixes improper database name when a '.' is included while creating a new railsJeremy W. Rowe2013-01-161-0/+5
| | | | | | | | | | | | application. EG: `rails new something.awesome.com` Conflicts: railties/CHANGELOG.md
* | Deprecate the `eager_load_paths` configurationAndrew White2013-01-243-38/+30
| | | | | | | | | | | | | | | | | | | | Since the default in Rails 4.0 is to run in 'threadsafe' mode we need to eager load all of the paths in `autoload_paths` so we alias `eager_load_paths` to it. This may have unintended consequences if you have added 'lib' to `autoload_paths` such as loading unneeded code or code intended only for development and/or test environments. If this applies to your application you should thoroughly check what is being eager loaded.
* | Revert "Set the default timezone after the initialization since the ↵Carlos Antonio da Silva2013-01-221-11/+1
| | | | | | | | | | | | configuration" This reverts commit 39374aa925a7d670b039c0c0c9aa9f4aef19466b.
* | Merge pull request #8557 from timraymond/add_back_engines_and_deprecateRafael Mendonça França2013-01-221-0/+6
|\ \ | | | | | | | | | | | | | | | | | | Adding Back Rails::Engine::Railties#engines Conflicts: railties/CHANGELOG.md
| * | Adding Back Rails::Engine::Railties#enginesTim Raymond2013-01-031-0/+6
| | | | | | | | | | | | | | | Removing it breaks functionality with gems such as Thinking Sphinx. This restores it with a deprecation warning. Closes #8551
* | | Fix asset_path in mounted enginePiotr Sarnacki2013-01-211-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically serving assets from a mountable engine could be achieved by running ActionDispatch::Static as a part of engine middleware stack or to copy assets prefixed with an engine name. After introduction of assets pipeline this is not needed as all of the assets are served or compiled into main application's assets. This commit removes the obsolete line making asset_path always generate paths relative to the root or config.relative_url_root if it's set. (closes #8119)
* | | Restore and adapt the implementation reverted atRafael Mendonça França2013-01-191-0/+48
| | | | | | | | | | | | | | | | | | https://github.com/rails/rails/commit/cc1c3c5be061e7572018f734e5239750ab449e3f Now instead of raise, we log by default in development and test
* | | script => binAkira Matsuda2013-01-181-6/+6
| |/ |/|
* | allow :dirs option for .enumerateBrian D. Burns2013-01-151-0/+39
| | | | | | | | | | | | Allows custom rake tasks to be defined using: SourceAnnotationExtractor.enumerate 'TODO|FIXME', dirs: %w(app lib), tag: true