aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2012-10-14 09:57:41 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2012-10-14 09:57:41 -0700
commit6338e1e68dfbe77c39eaaa17bb4950ef7db73704 (patch)
tree6bca387ebcc859a5f277a65f268cd885c7e1b00c /railties/test/generators_test.rb
parent1974911b8d5780ec16e138027a0099bd8482f88f (diff)
parent5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3 (diff)
downloadrails-6338e1e68dfbe77c39eaaa17bb4950ef7db73704.tar.gz
rails-6338e1e68dfbe77c39eaaa17bb4950ef7db73704.tar.bz2
rails-6338e1e68dfbe77c39eaaa17bb4950ef7db73704.zip
Merge pull request #7941 from robin850/master
Use 1.9 Hash syntax in railties
Diffstat (limited to 'railties/test/generators_test.rb')
-rw-r--r--railties/test/generators_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/test/generators_test.rb b/railties/test/generators_test.rb
index 027d8eb9b7..9953aa929b 100644
--- a/railties/test/generators_test.rb
+++ b/railties/test/generators_test.rb
@@ -43,8 +43,8 @@ class GeneratorsTest < Rails::Generators::TestCase
end
def test_invoke_with_config_values
- Rails::Generators::ModelGenerator.expects(:start).with(["Account"], :behavior => :skip)
- Rails::Generators.invoke :model, ["Account"], :behavior => :skip
+ Rails::Generators::ModelGenerator.expects(:start).with(["Account"], behavior: :skip)
+ Rails::Generators.invoke :model, ["Account"], behavior: :skip
end
def test_find_by_namespace
@@ -165,7 +165,7 @@ class GeneratorsTest < Rails::Generators::TestCase
end
def test_developer_options_are_overwriten_by_user_options
- Rails::Generators.options[:with_options] = { :generate => false }
+ Rails::Generators.options[:with_options] = { generate: false }
self.class.class_eval(<<-end_eval, __FILE__, __LINE__ + 1)
class WithOptionsGenerator < Rails::Generators::Base
@@ -186,7 +186,7 @@ class GeneratorsTest < Rails::Generators::TestCase
File.open(template, 'w'){ |f| f.write "empty" }
capture(:stdout) do
- Rails::Generators.invoke :model, ["user"], :destination_root => destination_root
+ Rails::Generators.invoke :model, ["user"], destination_root: destination_root
end
assert_file "app/models/user.rb" do |content|