[rspec-users] Fixture::FormatError parsing YAML

WJSimacek wayne.simacek at gmail.com
Mon May 18 11:31:03 EDT 2009


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 at 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 at 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 %>


More information about the rspec-users mailing list