Forum: RSpec Fixture::FormatError parsing YAML

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A66a4d323674aba4a904ceeff3f34658?d=identicon&s=25 WJSimacek (Guest)
on 2009-05-18 17:32
(Received via mailing list)
Hi,
    I'm trying to test restful_authentication plugin and am getting
errors with my install.
      ==>I've been through the YAML specification and actually copied
the fixture file into word looking for tabs instead of spaces. I've
played with various parts of the formatting, but I need a fresh pair
of eyes on this one.

  1) Error:
test_the_truth(PostTest):
Fixture::FormatError: a YAML error occurred parsing C:/Users/Wayne/
Documents/Aptana Studio/blog/test/fixtures/fixtures.yml. Please note
that YAML must be consistently indented using spaces. Tabs are not
allowed. Please have a look at http://www.yaml.org/faq.html
The exact error was:
  NameError: undefined local variable or method `options' for
main:Object

Here's the related fixtures.yml
quentin:
  id: 1
  login: quentin
  email: quentin@example.com
  salt: 7e3041ebc2fc05a40c60028e2c4901a81035d3cd
  crypted_password: 00742970dc9e6319f8019fd54864d3ea740f04b1
  created_at: <%= 5.days.ago.to_s :db %>
<% if options[:include_activation] %>  activation_code:
8f24789ae988411ccf33ab0c30fe9106fab32e9b <% end %>
<% if options[:include_activation] %>  activated_at: <%=
5.days.ago.to_s :db %> <% end %>
<% if options[:stateful] %>  state: active<% end %>
aaron:
  id: 2
  login: aaron
  email: aaron@example.com
  salt: 7e3041ebc2fc05a40c60028e2c4901a81035d3cd
  crypted_password: 00742970dc9e6319f8019fd54864d3ea740f04b1
  created_at: <%= 1.days.ago.to_s :db %>
<% if options[:include_activation] %>  activation_code:
8f24789ae988411ccf33ab0c30fe9106fab32e9a <% end %>
<% if options[:stateful] %>  state: pending<% end %>
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2009-05-18 21:24
(Received via mailing list)
On Mon, May 18, 2009 at 10:31 AM, WJSimacek <wayne.simacek@gmail.com>
wrote:
> Fixture::FormatError: a YAML error occurred parsing C:/Users/Wayne/
> Documents/Aptana Studio/blog/test/fixtures/fixtures.yml. Please note
> that YAML must be consistently indented using spaces. Tabs are not
> allowed. Please have a look at http://www.yaml.org/faq.html
> The exact error was:
>  NameError: undefined local variable or method `options' for
> main:Object

What line/file is this last bit happening on? I wonder if the YML
problem is a red herring.
A66a4d323674aba4a904ceeff3f34658?d=identicon&s=25 WJSimacek (Guest)
on 2009-05-18 22:04
(Received via mailing list)
On May 18, 2:16 pm, David Chelimsky <dchelim...@gmail.com> wrote:
> > test_the_truth(PostTest):
>
I'm not sure how to answer your question? Is there a way I can re-run
the specific test with a --trace option to have something more to send
you? --Wayne [p.s. --this is just one of several YAML parsing errors
I'm getting. If it is a red herring....it's a Whopper!

Here's some related ones--
  1) Error:
test_should_create_post(PostsControllerTest):
Fixture::FormatError: a YAML error occurred parsing C:/Users/Wayne/
Documents/Aptana Studio/blog/test/fixtures/fixtures.yml. Please note
that YAML must be consistently indented using spaces. Tabs are not
allowed. Please have a look at http://www.yaml.org/faq.html
The exact error was:
  NameError: undefined local variable or method `options' for
main:Object


  2) Error:
test_should_destroy_post(PostsControllerTest):
Fixture::FormatError: a YAML error occurred parsing C:/Users/Wayne/
Documents/Aptana Studio/blog/test/fixtures/fixtures.yml. Please note
that YAML must be consistently indented using spaces. Tabs are not
allowed. Please have a look at http://www.yaml.org/faq.html
The exact error was:
  NameError: undefined local variable or method `options' for
main:Object


  3) Error:
test_should_get_edit(PostsControllerTest):
Fixture::FormatError: a YAML error occurred parsing C:/Users/Wayne/
Documents/Aptana Studio/blog/test/fixtures/fixtures.yml. Please note
that YAML must be consistently indented using spaces. Tabs are not
allowed. Please have a look at http://www.yaml.org/faq.html
The exact error was:
  NameError: undefined local variable or method `options' for
main:Object


  4) Error:
test_should_get_index(PostsControllerTest):
Fixture::FormatError: a YAML error occurred parsing C:/Users/Wayne/
Documents/Aptana Studio/blog/test/fixtures/fixtures.yml. Please note
that YAML must be consistently indented using spaces. Tabs are not
allowed. Please have a look at http://www.yaml.org/faq.html
The exact error was:
  NameError: undefined local variable or method `options' for
main:Object


  5) Error:
test_should_get_new(PostsControllerTest):
Fixture::FormatError: a YAML error occurred parsing C:/Users/Wayne/
Documents/Aptana Studio/blog/test/fixtures/fixtures.yml. Please note
that YAML must be consistently indented using spaces. Tabs are not
allowed. Please have a look at http://www.yaml.org/faq.html
The exact error was:
  NameError: undefined local variable or method `options' for
main:Object


  6) Error:
test_should_show_post(PostsControllerTest):
Fixture::FormatError: a YAML error occurred parsing C:/Users/Wayne/
Documents/Aptana Studio/blog/test/fixtures/fixtures.yml. Please note
that YAML must be consistently indented using spaces. Tabs are not
allowed. Please have a look at http://www.yaml.org/faq.html
The exact error was:
  NameError: undefined local variable or method `options' for
main:Object


  7) Error:
test_should_update_post(PostsControllerTest):
Fixture::FormatError: a YAML error occurred parsing C:/Users/Wayne/
Documents/Aptana Studio/blog/test/fixtures/fixtures.yml. Please note
that YAML must be consistently indented using spaces. Tabs are not
allowed. Please have a look at http://www.yaml.org/faq.html
The exact error was:
  NameError: undefined local variable or method `options' for
main:Object


  8) Error:
test_should_delete_token_on_logout(SessionsControllerTest):
NoMethodError: undefined method `login_as' for
#<SessionsControllerTest:0x5fd7f14>
    /test/functional/sessions_controller_test.rb:50:in
`test_should_delete_token_on_logout'

  9) Error:
test_should_fail_cookie_login(SessionsControllerTest):
NoMethodError: undefined method `users' for #<SessionsControllerTest:
0x5fd7f00>
    /test/functional/sessions_controller_test.rb:71:in
`test_should_fail_cookie_login'

 10) Error:
test_should_fail_expired_cookie_login(SessionsControllerTest):
NoMethodError: undefined method `users' for #<SessionsControllerTest:
0x5fd7ed8>
    /test/functional/sessions_controller_test.rb:63:in
`test_should_fail_expired_cookie_login'

 11) Error:
test_should_fail_login_and_not_redirect(SessionsControllerTest):
NoMethodError: undefined method `post' for #<SessionsControllerTest:
0x5fd7eb0>
    /test/functional/sessions_controller_test.rb:27:in
`test_should_fail_login_and_not_redirect'

 12) Error:
test_should_login_and_redirect(SessionsControllerTest):
NoMethodError: undefined method `post' for #<SessionsControllerTest:
0x5fd7e88>
    /test/functional/sessions_controller_test.rb:21:in
`test_should_login_and_redirect'

 13) Error:
test_should_login_with_cookie(SessionsControllerTest):
NoMethodError: undefined method `users' for #<SessionsControllerTest:
0x5fd7e60>
    /test/functional/sessions_controller_test.rb:56:in
`test_should_login_with_cookie'

 14) Error:
test_should_logout(SessionsControllerTest):
NoMethodError: undefined method `login_as' for
#<SessionsControllerTest:0x5fd7e38>
    /test/functional/sessions_controller_test.rb:33:in
`test_should_logout'

 15) Error:
test_should_not_remember_me(SessionsControllerTest):
NoMethodError: undefined method `post' for #<SessionsControllerTest:
0x5fd7e10>
    /test/functional/sessions_controller_test.rb:45:in
`test_should_not_remember_me'

 16) Error:
test_should_remember_me(SessionsControllerTest):
NoMethodError: undefined method `post' for #<SessionsControllerTest:
0x5fd7de8>
    /test/functional/sessions_controller_test.rb:40:in
`test_should_remember_me'

16 tests, 0 assertions, 0 failures, 16 errors
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2009-05-27 10:31
(Received via mailing list)
On Mon, May 18, 2009 at 3:50 PM, WJSimacek <wayne.simacek@gmail.com>
wrote:
>> > of eyes on this one.
>>
>> What line/file is this last bit happening on? I wonder if the YML
>> problem is a red herring.
>>
> I'm not sure how to answer your question? Is there a way I can re-run
> the specific test with a --trace option to have something more to send
> you? --Wayne [p.s. --this is just one of several YAML parsing errors
> I'm getting. If it is a red herring....it's a Whopper!

Unfortunately you're using a combination of tools and platforms that I
don't have any experience with.

Anybody else using Aptana on Windows who can help debug this?
This topic is locked and can not be replied to.