Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
## memory_requests.rb class MemoryRequests < ActiveRecord::Base belongs_to :user belongs_to :requester, :class_name => "user", :foreign_key => "requester_id" end ## users.yml quentin: login: quentin email: quentin@example.com salt: 7e3041ebc2fc05a40c60028e2c4901a81035d3cd crypted_password: 00742970dc9e6319f8019fd54864d3ea740f04b1 # test first_name: quentin last_name: thefirst aaron: login: aaron email: aaron@example.com salt: 7e3041ebc2fc05a40c60028e2c4901a81035d3cd crypted_password: 00742970dc9e6319f8019fd54864d3ea740f04b1 # test first_name: aaron last_name: thesecond ## memory_requests.yml one: user: quentin requester: aaron subject: This is a request message_request: This is the message itself ## memory_requests_test.rb require File.dirname(__FILE__) + '/../test_helper' class MemoryRequestsTest < ActiveSupport::TestCase fixtures :users, :memory_requests def test_create request = memory_requests(:one) assert request.user = users(:quentin) assert request.requester = users(:aaron) end end ## question When I try and run the test is says that it can't find the column user in the memory_requests table??? I thought I've got them right for 2.0, hmmm.
This paste will be private.
From the Design Piracy series on my blog: