运行 Rake 测试时,我收到一些关于 YAML 文件的错误。关于如何解决它的任何想法?
运行测试:EEEEEEEE
在 0.070970 秒、112.7237 次测试/秒、0.0000 次断言/秒内完成测试。
1) 错误:test_should_create_product(ProductsControllerTest): ActiveRecord::Fixture::FormatError: 解析 /Users/ka/src/ruby-test/depot/test/fixtures/products.yml 时出现 YAML 错误。请注意,YAML 必须始终使用空格缩进。不允许使用标签。请查看 yaml.org/faq.html 确切的错误是:Psych::SyntaxError: (): found character that cannot start any token while scanning for the next token at line 5 column 1 /Users/ka/.rvm /gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:43:in rows' /Users/ka/.rvm/gems/ruby-1.9.3- p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:29:ineach' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/ lib/active_record/fixtures.rb:670:在 read_fixture_files'/Users/ka/ 中的块(2 级)中。
2) 错误:test_should_destroy_product(ProductsControllerTest): ActiveRecord::Fixture::FormatError: 解析 /Users/ka/src/ruby-test/depot/test/fixtures/products.yml 时出现 YAML 错误。请注意,YAML 必须始终使用空格缩进。不允许使用标签。请查看://www.yaml.org/faq.html 确切的错误是:Psych::SyntaxError: (): found character that cannot start any token while scanning for the next token at line 5 column 1 /Users /ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:43:in rows' /Users/ka/.rvm/gems/ruby -1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:29:ineach' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord -3.2.8/lib/active_record/fixtures.rb:670:在 read_fixture_files'/Users/ka/ 中的块(2 级)中。
3) 错误:test_should_get_edit(ProductsControllerTest): ActiveRecord::Fixture::FormatError: 解析 /Users/ka/src/ruby-test/depot/test/fixtures/products.yml 时出现 YAML 错误。请注意,YAML 必须始终使用空格缩进。不允许使用标签。请查看://www.yaml.org/faq.html 确切的错误是:Psych::SyntaxError: (): found character that cannot start any token while scanning for the next token at line 5 column 1 /Users /ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:43:in rows' /Users/ka/.rvm/gems/ruby -1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:29:ineach' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord -3.2.8/lib/active_record/fixtures.rb:670:在 read_fixture_files'/Users/ka/ 中的块(2 级)中。
4) 错误:test_should_get_index(ProductsControllerTest): ActiveRecord::Fixture::FormatError: 解析 /Users/ka/src/ruby-test/depot/test/fixtures/products.yml 时出现 YAML 错误。请注意,YAML 必须始终使用空格缩进。不允许使用标签。请查看://www.yaml.org/faq.html 确切的错误是:Psych::SyntaxError: (): found character that cannot start any token while scanning for the next token at line 5 column 1 /Users /ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:43:in rows' /Users/ka/.rvm/gems/ruby -1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:29:ineach' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord -3.2.8/lib/active_record/fixtures.rb:670:在 read_fixture_files'/Users/ka/ 中的块(2 级)中。
5) 错误:test_should_get_new(ProductsControllerTest): ActiveRecord::Fixture::FormatError: 解析 /Users/ka/src/ruby-test/depot/test/fixtures/products.yml 时出现 YAML 错误。请注意,YAML 必须始终使用空格缩进。不允许使用标签。请查看://www.yaml.org/faq.html 确切的错误是:Psych::SyntaxError: (): found character that cannot start any token while scanning for the next token at line 5 column 1 /Users /ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:43:in rows' /Users/ka/.rvm/gems/ruby -1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:29:ineach' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord -3.2.8/lib/active_record/fixtures.rb:670:在 read_fixture_files'/Users/ka/ 中的块(2 级)中。
6) 错误:test_should_show_product(ProductsControllerTest): ActiveRecord::Fixture::FormatError: 解析 /Users/ka/src/ruby-test/depot/test/fixtures/products.yml 时出现 YAML 错误。请注意,YAML 必须始终使用空格缩进。不允许使用标签。请查看://www.yaml.org/faq.html 确切的错误是:Psych::SyntaxError: (): found character that cannot start any token while scanning for the next token at line 5 column 1 /Users /ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:43:in rows' /Users/ka/.rvm/gems/ruby -1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:29:ineach' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord -3.2.8/lib/active_record/fixtures.rb:670:在 read_fixture_files'/Users/ka/ 中的块(2 级)中。
7) 错误:test_should_update_product(ProductsControllerTest): ActiveRecord::Fixture::FormatError: 解析 /Users/ka/src/ruby-test/depot/test/fixtures/products.yml 时出现 YAML 错误。请注意,YAML 必须始终使用空格缩进。不允许使用标签。请查看://www.yaml.org/faq.html 确切的错误是:Psych::SyntaxError: (): found character that cannot start any token while scanning for the next token at line 5 column 1 /Users /ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:43:in rows' /Users/ka/.rvm/gems/ruby -1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:29:ineach' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord -3.2.8/lib/active_record/fixtures.rb:670:在 read_fixture_files'/Users/ka/ 中的块(2 级)中。
8) 错误:test_should_get_index(StoreControllerTest): ActiveRecord::Fixture::FormatError: 解析 /Users/ka/src/ruby-test/depot/test/fixtures/products.yml 时出现 YAML 错误。请注意,YAML 必须始终使用空格缩进。不允许使用标签。请查看://www.yaml.org/faq.html 确切的错误是:Psych::SyntaxError: (): found character that cannot start any token while scanning for the next token at line 5 column 1 /Users /ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:43:in rows' /Users/ka/.rvm/gems/ruby -1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/fixtures/file.rb:29:ineach' /Users/ka/.rvm/gems/ruby-1.9.3-p194/gems/activerecord -3.2.8/lib/active_record/fixtures.rb:670:在 read_fixture_files'/Users/ka/ 中的块(2 级)中。
8 个测试,0 个断言,0 个失败,8 个错误,0 个跳过 Errors running test:units! # 错误运行测试:功能!#