Forum: Rails Engines development Testing?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Seth (Guest)
on 2006-01-04 22:34
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? :)
Lance B. (Guest)
on 2006-01-04 22:57
(Received via mailing list)
On 1/4/06, Seth <removed_email_address@domain.invalid> 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".
Seth (Guest)
on 2006-01-05 01:35
Lance B. wrote:

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

Bingo...thanks.
Seth (Guest)
on 2006-03-22 05:14
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:in
`connect'
        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:in
`new'
        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:in
`send'
        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:in
`connection='
        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:in
`load'
        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...]
James A. (Guest)
on 2006-03-23 03:24
(Received via mailing list)
On 3/22/06, Seth <removed_email_address@domain.invalid> 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 *
  ~
Seth (Guest)
on 2006-03-23 03:43
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 <removed_email_address@domain.invalid> 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 *
>   ~
This topic is locked and can not be replied to.