tracks/vendor/plugins/simply_helpful/test/test_helper.rb
2008-05-20 21:28:26 +01:00

25 lines
No EOL
545 B
Ruby

RAILS_ENV = 'test'
require File.expand_path(File.join(File.dirname(__FILE__), '../../../../config/environment.rb'))
require 'action_controller/test_process'
require 'breakpoint'
class Post
attr_reader :id
def save; @id = 1 end
def new_record?; @id.nil? end
def name
@id.nil? ? 'new post' : "post ##{@id}"
end
class Nested < Post; end
end
class Test::Unit::TestCase
protected
def posts_url
'http://www.example.com/posts'
end
def post_url(post)
"http://www.example.com/posts/#{post.id}"
end
end