I have checked out from the trunk.
I have created what I assume is the test database based on contents of
activerecord/test/fixtures
QUESTIONS:
1) I'm not sure how to actually attempt to run the tests. Where do I
configure the DB connection to point to my test database?
2) How do I actually run the tests?
Thanks,
Wes
--
Posted via http://www.ruby-forum.com/.
If you go into the activerecord directory, there's a file called
RUNNING_UNIT_TESTS. In there, it says:
== Creating the test database
The default names for the test databases are "activerecord_unittest"
and
"activerecord_unittest2". If you want to use another database name then
be sure
to update the connection adapter setups you want to test with in
test/connections/<your database>/connection.rb.
When you have the database online, you can import the fixture tables
with
the test/fixtures/db_definitions/*.sql files.
Assuming you're running MySQL, this means that you have to create two
new databases called 'activerecord_unittest' and
'activerecord_unittest2'. Then, import the starting structure/data in
from the provided SQL files using commands like:
mysql -u root -p activerecord_unittest <
test/fixtures/db_definitions/mysql.sql
mysql -u root -p activerecord_unittest2 <
test/fixtures/db_definitions/mysql2.sql
If you look in the connections.rb file in
test/connections/native_mysql/connection.rb, you'll see that it is set
up by default to use a user 'rails' with no password. So make a user
'rails' with no password and grant it permissions on the two new
databases.
> 2) How do I actually run the tests?
Again, in RUNNING_UNIT_TESTS, it says:
The easiest way to run the unit tests is through Rake. The default task
runs
the entire test suite for all the adapters. You can also run the suite
on just
one adapter by using the tasks test_mysql_ruby, test_ruby_mysql,
test_sqlite,
or test_postgresql. For more information, checkout the full array of
rake tasks with "rake -T"
So to run the tests using the MySQL adapter, just run
rake test_mysql
Hope that helps.
Chris
On 9/8/06, スタン マズレック <smaz...@doubleclick.ne.jp> wrote:
I have a quirk in my application : i can't make send_data to stream for download (disposition=attachment) an image over SSL with internet explorer.
Works fine with FF (ssl or not), works fine inline (ssl or not, IE or FF), works even fine without ssl (still IE).
see my source below. I'm using lighttpd with fcgi, nothing fancy.
def download
qr = blabla (edit)
send_data(qr.to_blob, :filename => qr.code+'.png', :type => 'image/x-png', :disposition => 'attachment', :streaming => 'true', :buffer_size => '4096' )
end
Any ideas, suggestion, quirk-remover-spray ? (I'm desperate..)
Thanks! I look forward to doing it later today.