diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-04-09 11:03:10 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-04-09 11:03:10 -0700 |
commit | db5e578b647e1730ea2aecb1ca58fd9a434f6cf6 (patch) | |
tree | 524517ae1ffc1ec01af367d72a51a8323dee931b /railties/test | |
parent | 3321d1a2d1908f25d962169d0a88b55bca3c2370 (diff) | |
parent | 7b75b678cf11a1aed7927a9db42fb60a38726450 (diff) | |
download | rails-db5e578b647e1730ea2aecb1ca58fd9a434f6cf6.tar.gz rails-db5e578b647e1730ea2aecb1ca58fd9a434f6cf6.tar.bz2 rails-db5e578b647e1730ea2aecb1ca58fd9a434f6cf6.zip |
Merge branch 'master' into adequaterecord
* master: (26 commits)
Avoid URI parsing
Add missing require so requiring `active_support/cache` works again.
depend_on_asset is not required anymore on sprockets-rails 2.1.2
upgrading section for 4.1 is no longer WIP. [ci skip]
Expand explanation of how to set secrets.yml. [ci skip]
Guides: minor typo fixed [ci skip]
Fixed problem where `1.day.eql?(1.day)` is false
new CHANGELOGs entries are in the top [ci skip]
Updates the maintenance policy with new Rails versions
Dont abbreviate that which needs no abbreviation
Dont encourage aliases now that we have variants
Use short-form for the scaffold render calls and drop the needless test
Drop in @jeremy's new database.yml template text
Don't deprecate after all
Less ambition, more deprecation
Ensure we correctly and immediately load all ENV entries
Give a deprecation message even when the lookup fails
Rearrange the config merger some more
entry is always a Hash
Check env_url only once
...
Conflicts:
Gemfile
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/assets_test.rb | 12 | ||||
-rw-r--r-- | railties/test/generators/scaffold_controller_generator_test.rb | 7 |
2 files changed, 6 insertions, 13 deletions
diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index 6cc17ad176..51f55a560f 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -42,7 +42,7 @@ module ApplicationTests test "assets routes have higher priority" do app_file "app/assets/images/rails.png", "notactuallyapng" - app_file "app/assets/javascripts/demo.js.erb", "//= depend_on_asset 'rails.png'\na = <%= image_path('rails.png').inspect %>;" + app_file "app/assets/javascripts/demo.js.erb", "a = <%= image_path('rails.png').inspect %>;" app_file 'config/routes.rb', <<-RUBY Rails.application.routes.draw do @@ -200,7 +200,7 @@ module ApplicationTests test "precompile creates a manifest file with all the assets listed" do app_file "app/assets/images/rails.png", "notactuallyapng" - app_file "app/assets/stylesheets/application.css.erb", "//= depend_on_asset 'rails.png'\n <%= asset_path('rails.png') %>" + app_file "app/assets/stylesheets/application.css.erb", "<%= asset_path('rails.png') %>" app_file "app/assets/javascripts/application.js", "alert();" # digest is default in false, we must enable it for test environment add_to_config "config.assets.digest = true" @@ -261,7 +261,7 @@ module ApplicationTests test "precompile shouldn't use the digests present in manifest.json" do app_file "app/assets/images/rails.png", "notactuallyapng" - app_file "app/assets/stylesheets/application.css.erb", "//= depend_on rails.png\np { url: <%= asset_path('rails.png') %> }" + app_file "app/assets/stylesheets/application.css.erb", "p { url: <%= asset_path('rails.png') %> }" ENV["RAILS_ENV"] = "production" precompile! @@ -280,7 +280,7 @@ module ApplicationTests test "precompile appends the md5 hash to files referenced with asset_path and run in production with digest true" do app_file "app/assets/images/rails.png", "notactuallyapng" - app_file "app/assets/stylesheets/application.css.erb", "//= depend_on_asset 'rails.png'\n<%= asset_path('rails.png') %>" + app_file "app/assets/stylesheets/application.css.erb", "<%= asset_path('rails.png') %>" add_to_config "config.assets.compile = true" add_to_config "config.assets.digest = true" @@ -449,7 +449,7 @@ module ApplicationTests test "asset urls should be protocol-relative if no request is in scope" do app_file "app/assets/images/rails.png", "notreallyapng" - app_file "app/assets/javascripts/image_loader.js.erb", "//= depend_on_asset 'rails.png'\n\nvar src='<%= image_path('rails.png') %>';" + app_file "app/assets/javascripts/image_loader.js.erb", "var src='<%= image_path('rails.png') %>';" add_to_config "config.assets.precompile = %w{image_loader.js}" add_to_config "config.asset_host = 'example.com'" precompile! @@ -461,7 +461,7 @@ module ApplicationTests ENV["RAILS_RELATIVE_URL_ROOT"] = "/sub/uri" app_file "app/assets/images/rails.png", "notreallyapng" - app_file "app/assets/javascripts/app.js.erb", "//= depend_on_asset 'rails.png'\n\nvar src='<%= image_path('rails.png') %>';" + app_file "app/assets/javascripts/app.js.erb", "var src='<%= image_path('rails.png') %>';" add_to_config "config.assets.precompile = %w{app.js}" precompile! diff --git a/railties/test/generators/scaffold_controller_generator_test.rb b/railties/test/generators/scaffold_controller_generator_test.rb index 26e56a162c..3c1123b53d 100644 --- a/railties/test/generators/scaffold_controller_generator_test.rb +++ b/railties/test/generators/scaffold_controller_generator_test.rb @@ -160,13 +160,6 @@ class ScaffoldControllerGeneratorTest < Rails::Generators::TestCase Unknown::Generators.send :remove_const, :ActiveModel end - def test_new_hash_style - run_generator - assert_file "app/controllers/users_controller.rb" do |content| - assert_match(/render action: 'new'/, content) - end - end - def test_model_name_option run_generator ["Admin::User", "--model-name=User"] assert_file "app/controllers/admin/users_controller.rb" do |content| |