From 899cae25ecd0f5b187cfc1a56c55ed2936885c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 26 Dec 2012 12:23:39 -0300 Subject: Consistent use of single and double quotes --- railties/test/generators/model_generator_test.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'railties') diff --git a/railties/test/generators/model_generator_test.rb b/railties/test/generators/model_generator_test.rb index 9dd61e9c15..01ab77ee20 100644 --- a/railties/test/generators/model_generator_test.rb +++ b/railties/test/generators/model_generator_test.rb @@ -264,39 +264,39 @@ class ModelGeneratorTest < Rails::Generators::TestCase error = capture(:stderr) { run_generator ["Account", "--force"] } assert_no_match(/Another migration is already named create_accounts/, error) assert_no_file old_migration - assert_migration 'db/migrate/create_accounts.rb' + assert_migration "db/migrate/create_accounts.rb" end def test_invokes_default_test_framework run_generator assert_file "test/models/account_test.rb", /class AccountTest < ActiveSupport::TestCase/ - assert_file 'test/fixtures/accounts.yml', /name: MyString/, /age: 1/ - assert_generated_fixture('test/fixtures/accounts.yml', - {'one'=>{'name'=>'MyString', 'age'=>1}, 'two'=>{'name'=>'MyString', 'age'=>1}}) + assert_file "test/fixtures/accounts.yml", /name: MyString/, /age: 1/ + assert_generated_fixture("test/fixtures/accounts.yml", + {"one"=>{"name"=>"MyString", "age"=>1}, "two"=>{"name"=>"MyString", "age"=>1}}) end def test_fixtures_use_the_references_ids run_generator ["LineItem", "product:references", "cart:belongs_to"] - assert_file 'test/fixtures/line_items.yml', /product_id: \n cart_id: / - assert_generated_fixture('test/fixtures/line_items.yml', + assert_file "test/fixtures/line_items.yml", /product_id: \n cart_id: / + assert_generated_fixture("test/fixtures/line_items.yml", {"one"=>{"product_id"=>nil, "cart_id"=>nil}, "two"=>{"product_id"=>nil, "cart_id"=>nil}}) end def test_fixtures_use_the_references_ids_and_type run_generator ["LineItem", "product:references{polymorphic}", "cart:belongs_to"] - assert_file 'test/fixtures/line_items.yml', /product_id: \n product_type: Product\n cart_id: / - assert_generated_fixture('test/fixtures/line_items.yml', + assert_file "test/fixtures/line_items.yml", /product_id: \n product_type: Product\n cart_id: / + assert_generated_fixture("test/fixtures/line_items.yml", {"one"=>{"product_id"=>nil, "product_type"=>"Product", "cart_id"=>nil}, "two"=>{"product_id"=>nil, "product_type"=>"Product", "cart_id"=>nil}}) end def test_fixtures_respect_reserved_yml_keywords - run_generator ["LineItem", "no:integer", "Off:boolean", 'ON:boolean'] + run_generator ["LineItem", "no:integer", "Off:boolean", "ON:boolean"] - assert_generated_fixture('test/fixtures/line_items.yml', + assert_generated_fixture("test/fixtures/line_items.yml", {"one"=>{"no"=>1, "Off"=>false, "ON"=>false}, "two"=>{"no"=>1, "Off"=>false, "ON"=>false}}) end -- cgit v1.2.3