public
Fork of ferblape/query_memcached
Description: A replacement for ActiveRecord query_cache that a adds a Memcache layer for persistence of the query's cache
Homepage: https://github.com/ferblape/query_memcached/tree
Clone URL: git://github.com/methodmissing/query_memcached.git
query_memcached / RUNNING_TESTS
100644 20 lines (12 sloc) 0.595 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
= Running tests
 
For testing this plugin I decided to adapt a the query cache tests from ActiveRecord.
 
First of all you have to know that there is a Rails 2.1 application in test/testing_app. This application contains a lot of models. AR test suite has been converted to the Unit Tests of this application.
 
So you need a database as indicated in config/database.yml:
 
  user: root
  adapter: mysql
  database: 'activerecord_unittest'
  encoding: utf8
  
And also a memcached running in the standar port (11211).
 
Then, load the schema from db/schema.rb and run
 
  rake test:units
 
That's all.