Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Consistent use of single and double quotes

  • Loading branch information...
commit 899cae25ecd0f5b187cfc1a56c55ed2936885c21 1 parent d792737
@rafaelfranca rafaelfranca authored
Showing with 10 additions and 10 deletions.
  1. +10 −10 railties/test/generators/model_generator_test.rb
View
20 railties/test/generators/model_generator_test.rb
@@ -264,39 +264,39 @@ def test_existing_migration_is_removed_on_force
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

0 comments on commit 899cae2

Please sign in to comment.
Something went wrong with that request. Please try again.