<% ## this code must match that in templates/model.rb require 'digest/sha1' def make_fake_token @fake_token_counter ||= 0 @fake_token_counter += 1 Digest::SHA1.hexdigest(@fake_token_counter.to_s) end salts = (1..2).map{ make_fake_token } passwds = salts.map{ |salt| password_digest('monkey', salt) } -%> quentin: id: 1 login: quentin email: quentin@example.com salt: <%= salts[0] %> # SHA1('0') crypted_password: <%= passwds[0] %> # 'monkey' created_at: <%%= 5.days.ago.to_s :db %> remember_token_expires_at: <%%= 1.days.from_now.to_s %> remember_token: <%= make_fake_token %> <% if options[:include_activation] -%> activation_code: 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: <%= salts[1] %> # SHA1('1') crypted_password: <%= passwds[1] %> # 'monkey' created_at: <%%= 1.days.ago.to_s :db %> remember_token_expires_at: remember_token: <% if options[:include_activation] -%> activation_code: <%= make_fake_token %> activated_at: <% end -%> <% if options[:stateful] %> state: pending <% end -%> old_password_holder: id: 3 login: old_password_holder email: salty_dog@example.com salt: 7e3041ebc2fc05a40c60028e2c4901a81035d3cd crypted_password: 00742970dc9e6319f8019fd54864d3ea740f04b1 # test created_at: <%%= 1.days.ago.to_s :db %> <% if options[:include_activation] %> activation_code: activated_at: <%%= 5.days.ago.to_s :db %> <% end %> <% if options[:stateful] %> state: active<% end %>