diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-26 12:23:39 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-26 12:23:39 -0300 |
commit | 899cae25ecd0f5b187cfc1a56c55ed2936885c21 (patch) | |
tree | bc05364f7ebf0f013b3c4624894bc7be56019ed2 | |
parent | d792737207b53807bf124b6a6d72453871678a90 (diff) | |
download | rails-899cae25ecd0f5b187cfc1a56c55ed2936885c21.tar.gz rails-899cae25ecd0f5b187cfc1a56c55ed2936885c21.tar.bz2 rails-899cae25ecd0f5b187cfc1a56c55ed2936885c21.zip |
Consistent use of single and double quotes
-rw-r--r-- | railties/test/generators/model_generator_test.rb | 20 |
1 files changed, 10 insertions, 10 deletions
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 |