Hi Pat,

I am getting a similar error as karmacoma is experiencing. My issues
are subject only to one block of tests, sort modes in search spec. I
think it is because the previous section mocks the client_from_options
method and something is stopping rspec from releasing that mock. Here
are just a couple of my failed tests :

1)
NoMethodError in 'ThinkingSphinx::Search search method sort modes
should use :relevance as a default'
undefined method `client_from_options' for
ThinkingSphinx::Search:Class
./spec/../lib/thinking_sphinx/search.rb:450:in `search_results'
./spec/../lib/thinking_sphinx/search.rb:364:in `search'
./spec/../lib/thinking_sphinx/search.rb:388:in `call'
./spec/../lib/thinking_sphinx/search.rb:388:in
`retry_search_on_stale_index'
./spec/../lib/thinking_sphinx/search.rb:363:in `search'
./spec/unit/thinking_sphinx/search_spec.rb:66:

2)
NoMethodError in 'ThinkingSphinx::Search search method sort modes
should use :attr_asc if a symbol is supplied to :order'
undefined method `client_from_options' for
ThinkingSphinx::Search:Class
./spec/../lib/thinking_sphinx/search.rb:450:in `search_results'
./spec/../lib/thinking_sphinx/search.rb:364:in `search'
./spec/../lib/thinking_sphinx/search.rb:388:in `call'
./spec/../lib/thinking_sphinx/search.rb:388:in
`retry_search_on_stale_index'
./spec/../lib/thinking_sphinx/search.rb:363:in `search'
./spec/unit/thinking_sphinx/search_spec.rb:71:

I am trying to figure out a solution, but any and all help is
appreciated.

Thanks

Josh


On Jun 17, 2:03 pm, Pat Allan <[email protected]> wrote:
> Hmm, not sure what's causing those. I've just run specs with two  
> versions of ruby:
> * ruby 1.8.6 (2008-08-11 patchlevel 287)
> * ruby 1.9.1p129 (2009-05-12 revision 23412)
> And in both cases, all specs pass.
>
> Same version of TS and Rails, although rspec is 1.2.6.
>
> --
> Pat
>
> On 17/06/2009, at 5:19 AM, karmacoma wrote:
>
>
>
> > Hello,
> > I am getting several errors when I'm running the test suite via rake
> > spec.
>
> > I am using the following:
> > - ruby 1.8.7 (2008-08-11 patchlevel 72)
> > - rails 2.3.2
> > - thinking-sphinx (2019baff2f43520b85178a1a6fa8f302c2dc4cc9)
> > - rspec 1.2.4
>
> > Are these errors anything I should worry about?
> > Cheers, Oliver.
>
> > ---------
> > Pending:
>
> > ThinkingSphinx use_group_by_shortcut? method if not using MySQL should
> > return false (No PostgreSQL)
> > ./spec/unit/thinking_sphinx_spec.rb:140
>
> > ThinkingSphinx use_group_by_shortcut? method if not using MySQL should
> > not call select_all (No PostgreSQL)
> > ./spec/unit/thinking_sphinx_spec.rb:144
>
> > 1)
> > NoMethodError in 'ThinkingSphinx::Search search method sort modes
> > should use :relevance as a default'
> > undefined method `client_from_options' for
> > ThinkingSphinx::Search:Class
> > ./spec/../lib/thinking_sphinx/search.rb:450:in `search_results'
> > ./spec/../lib/thinking_sphinx/search.rb:364:in `search'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in `call'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in
> > `retry_search_on_stale_index'
> > ./spec/../lib/thinking_sphinx/search.rb:363:in `search'
> > ./spec/unit/thinking_sphinx/search_spec.rb:64:
>
> > 2)
> > NoMethodError in 'ThinkingSphinx::Search search method sort modes
> > should use :attr_asc if a symbol is supplied to :order'
> > undefined method `client_from_options' for
> > ThinkingSphinx::Search:Class
> > ./spec/../lib/thinking_sphinx/search.rb:450:in `search_results'
> > ./spec/../lib/thinking_sphinx/search.rb:364:in `search'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in `call'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in
> > `retry_search_on_stale_index'
> > ./spec/../lib/thinking_sphinx/search.rb:363:in `search'
> > ./spec/unit/thinking_sphinx/search_spec.rb:69:
>
> > 3)
> > NoMethodError in 'ThinkingSphinx::Search search method sort modes
> > should use :attr_desc if a symbol is supplied and :desc is the mode'
> > undefined method `client_from_options' for
> > ThinkingSphinx::Search:Class
> > ./spec/../lib/thinking_sphinx/search.rb:450:in `search_results'
> > ./spec/../lib/thinking_sphinx/search.rb:364:in `search'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in `call'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in
> > `retry_search_on_stale_index'
> > ./spec/../lib/thinking_sphinx/search.rb:363:in `search'
> > ./spec/unit/thinking_sphinx/search_spec.rb:74:
>
> > 4)
> > NoMethodError in 'ThinkingSphinx::Search search method sort modes
> > should use :extended if a string is supplied to :order'
> > undefined method `client_from_options' for
> > ThinkingSphinx::Search:Class
> > ./spec/../lib/thinking_sphinx/search.rb:450:in `search_results'
> > ./spec/../lib/thinking_sphinx/search.rb:364:in `search'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in `call'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in
> > `retry_search_on_stale_index'
> > ./spec/../lib/thinking_sphinx/search.rb:363:in `search'
> > ./spec/unit/thinking_sphinx/search_spec.rb:79:
>
> > 5)
> > NoMethodError in 'ThinkingSphinx::Search search method sort modes
> > should use :expr if explicitly requested with a string supplied
> > to :order'
> > undefined method `client_from_options' for
> > ThinkingSphinx::Search:Class
> > ./spec/../lib/thinking_sphinx/search.rb:450:in `search_results'
> > ./spec/../lib/thinking_sphinx/search.rb:364:in `search'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in `call'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in
> > `retry_search_on_stale_index'
> > ./spec/../lib/thinking_sphinx/search.rb:363:in `search'
> > ./spec/unit/thinking_sphinx/search_spec.rb:84:
>
> > 6)
> > NoMethodError in 'ThinkingSphinx::Search search method sort modes
> > should use :attr_desc if explicitly requested with a string supplied
> > to :order'
> > undefined method `client_from_options' for
> > ThinkingSphinx::Search:Class
> > ./spec/../lib/thinking_sphinx/search.rb:450:in `search_results'
> > ./spec/../lib/thinking_sphinx/search.rb:364:in `search'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in `call'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in
> > `retry_search_on_stale_index'
> > ./spec/../lib/thinking_sphinx/search.rb:363:in `search'
> > ./spec/unit/thinking_sphinx/search_spec.rb:89:
>
> > 7)
> > NoMethodError in 'ThinkingSphinx::Search search method grouping should
> > convert group into group_by and group_function'
> > undefined method `client_from_options' for
> > ThinkingSphinx::Search:Class
> > ./spec/../lib/thinking_sphinx/search.rb:450:in `search_results'
> > ./spec/../lib/thinking_sphinx/search.rb:364:in `search'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in `call'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in
> > `retry_search_on_stale_index'
> > ./spec/../lib/thinking_sphinx/search.rb:363:in `search'
> > ./spec/unit/thinking_sphinx/search_spec.rb:102:
>
> > 8)
> > NoMethodError in 'ThinkingSphinx::Search search method :comment option
> > should add comment to log'
> > undefined method `client_from_options' for
> > ThinkingSphinx::Search:Class
> > ./spec/../lib/thinking_sphinx/search.rb:450:in `search_results'
> > ./spec/../lib/thinking_sphinx/search.rb:364:in `search'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in `call'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in
> > `retry_search_on_stale_index'
> > ./spec/../lib/thinking_sphinx/search.rb:363:in `search'
> > ./spec/unit/thinking_sphinx/search_spec.rb:116:
>
> > 9)
> > NoMethodError in 'ThinkingSphinx::Search search method :comment option
> > should use a blank string when no comment is specified'
> > undefined method `client_from_options' for
> > ThinkingSphinx::Search:Class
> > ./spec/../lib/thinking_sphinx/search.rb:450:in `search_results'
> > ./spec/../lib/thinking_sphinx/search.rb:364:in `search'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in `call'
> > ./spec/../lib/thinking_sphinx/search.rb:388:in
> > `retry_search_on_stale_index'
> > ./spec/../lib/thinking_sphinx/search.rb:363:in `search'
> > ./spec/unit/thinking_sphinx/search_spec.rb:121:
>
> > 10)
> > Riddle::Configuration::ConfigurationError in
> > 'ThinkingSphinx::Configuration should insert set index options into
> > the configuration file'
> > alpha_core [] /home/oliver/git/greyville/vendor/plugins/thinking-
> > sphinx/tmp/db/sphinx/development/alpha_core
> > ./lib/../vendor/riddle/lib/riddle/configuration/index.rb:111:in
> > `render'
> > ./lib/../vendor/riddle/lib/riddle/configuration.rb:29:in `render'
> > ./lib/../vendor/riddle/lib/riddle/configuration.rb:29:in `collect'
> > ./lib/../vendor/riddle/lib/riddle/configuration.rb:29:in `render'
> > ./spec/../lib/thinking_sphinx/configuration.rb:151:in `build'
> > ./spec/../lib/thinking_sphinx/configuration.rb:150:in `open'
> > ./spec/../lib/thinking_sphinx/configuration.rb:150:in `build'
> > ./spec/unit/thinking_sphinx/configuration_spec.rb:186:
> > ./spec/unit/thinking_sphinx/configuration_spec.rb:184:in `each'
> > ./spec/unit/thinking_sphinx/configuration_spec.rb:184:
>
> > 11)
> > Riddle::Configuration::ConfigurationError in
> > 'ThinkingSphinx::Configuration should insert set source options into
> > the configuration file'
> > alpha_core [] /home/oliver/git/greyville/vendor/plugins/thinking-
> > sphinx/tmp/db/sphinx/development/alpha_core
> > ./lib/../vendor/riddle/lib/riddle/configuration/index.rb:111:in
> > `render'
> > ./lib/../vendor/riddle/lib/riddle/configuration.rb:29:in `render'
> > ./lib/../vendor/riddle/lib/riddle/configuration.rb:29:in `collect'
> > ./lib/../vendor/riddle/lib/riddle/configuration.rb:29:in `render'
> > ./spec/../lib/thinking_sphinx/configuration.rb:151:in `build'
> > ./spec/../lib/thinking_sphinx/configuration.rb:150:in `open'
> > ./spec/../lib/thinking_sphinx/configuration.rb:150:in `build'
> > ./spec/unit/thinking_sphinx/configuration_spec.rb:199:
> > ./spec/unit/thinking_sphinx/configuration_spec.rb:197:in `each'
> > ./spec/unit/thinking_sphinx/configuration_spec.rb:197:
>
> > 12)
> > 'ThinkingSphinx::Configuration should set any explicit prefixed or
> > infixed fields' FAILED
> > expected "" to match /prefix_fields\s+= city/
> > ./spec/unit/thinking_sphinx/configuration_spec.rb:212:
>
> > 13)
> > NoMethodError in 'ThinkingSphinx::Configuration#load_models should
> > load the files by guessing the file name'
> > undefined method `stub' for Dir:Class
> > ./spec/unit/thinking_sphinx/configuration_spec.rb:137:
>
> > 14)
> > NoMethodError in 'ThinkingSphinx::Configuration#load_models should not
> > raise errors if the model name is nil'
> > undefined method `stub' for Dir:Class
> > ./spec/unit/thinking_sphinx/configuration_spec.rb:137:
>
> > 15)
> > NoMethodError in 'ThinkingSphinx::Configuration#load_models should not
> > raise errors if the file name does not represent a class name'
> > undefined method `stub' for Dir:Class
> > ./spec/unit/thinking_sphinx/configuration_spec.rb:137:
>
> > 16)
> > NoMethodError in 'ThinkingSphinx::Configuration#load_models should
> > retry if the first pass fails and contains a directory'
> > undefined method `stub' for Dir:Class
> > ./spec/unit/thinking_sphinx/configuration_spec.rb:137:
>
> > 17)
> > NoMethodError in 'ThinkingSphinx::Configuration#load_models should
> > catch database errors with a warning'
> > undefined method `stub' for Dir:Class
> > ./spec/unit/thinking_sphinx/configuration_spec.rb:137:
>
> > Finished in 1.518449 seconds
>
> > 328 examples, 17 failures, 2 pending
> > ---------
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to