Testing?

Sorry for the flood, I’m just running into a lot of issues here and not
a lot of it seems to be documented.

Assuming I move my fixtures and unit tests to
…/vendor/plugins/my_engine/test why doesn’t rake test_units work any
longer?

Also, any of you guys hang out on irc? :slight_smile:

On 1/4/06, Seth [email protected] wrote:

Assuming I move my fixtures and unit tests to
…/vendor/plugins/my_engine/test why doesn’t rake test_units work any
longer?

Now that your tests are in the plugin engine dir, you need to run
“rake test_plugins”.

Lance B. wrote:

Now that your tests are in the plugin engine dir, you need to run
“rake test_plugins”.

Bingo…thanks.

Can someone point me to the latest docs on testing your engines?

I’m running into issues with rake test_plugins, but I can run my unit
tests solo just fine.

Sorry for the text dump…

(in /Work/subimage/substruct)
/usr/bin/ruby -Ilib:test
“/usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb”
“vendor/plugins/engines/test/ruby_extensions_test.rb”
“vendor/plugins/file_column/test/file_column_helper_test.rb”
“vendor/plugins/file_column/test/file_column_test.rb”
“vendor/plugins/file_column/test/magick_test.rb”
“vendor/plugins/file_column/test/magick_view_only_test.rb”
“vendor/plugins/substruct/test/unit/content_node_test.rb”
“vendor/plugins/substruct/test/unit/country_test.rb”
“vendor/plugins/substruct/test/unit/order_account_test.rb”
“vendor/plugins/substruct/test/unit/order_account_type_test.rb”
“vendor/plugins/substruct/test/unit/order_address_test.rb”
“vendor/plugins/substruct/test/unit/order_line_item_test.rb”
“vendor/plugins/substruct/test/unit/order_shipping_type_test.rb”
“vendor/plugins/substruct/test/unit/order_status_code_test.rb”
“vendor/plugins/substruct/test/unit/order_test.rb”
“vendor/plugins/substruct/test/unit/order_user_test.rb”
“vendor/plugins/substruct/test/unit/product_test.rb”
“vendor/plugins/substruct/test/unit/question_test.rb”
Using native MySQL
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:316:in
real_connect': Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (Mysql::Error) from /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:316:inconnect’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:87:in
initialize' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:37:innew’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:37:in
mysql_connection' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:insend’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in
connection_without_query_cache=' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/query_cache.rb:54:inconnection=’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:106:in
retrieve_connection' ... 19 levels... from /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:207:inload’
from
/usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb:5
from
/usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb:5:in
`each’
from
/usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb:5
rake aborted!
Command failed with status (1): [/usr/bin/ruby -Ilib:test
"/usr/lib/ruby/ge…]

Like I said, I doubt it’s that because I can unit test individual files
just fine…If there were a DB issue then they wouldn’t work at all,
right?

James A. wrote:

On 3/22/06, Seth [email protected] wrote:

`real_connect’: Can’t connect to local MySQL server through socket
‘/var/run/mysqld/mysqld.sock’ (2) (Mysql::Error)

This seems like a basic DB connection issue - do you definitely have
the right settings in your database.yml for the test environment?

  • james

  • J *
    ~

On 3/22/06, Seth [email protected] wrote:

`real_connect’: Can’t connect to local MySQL server through socket
‘/var/run/mysqld/mysqld.sock’ (2) (Mysql::Error)

This seems like a basic DB connection issue - do you definitely have
the right settings in your database.yml for the test environment?

  • james

  • J *
    ~