public
Description: Ambition adapter for Sphinx
Clone URL: git://github.com/technicalpickles/ambitious-sphinx.git
Some slight wording changes. Updated =~ spec to use to_hash. Removed 
unneeded =~ with regexp flags spec.
Josh Nichols (author)
Thu Feb 07 12:24:10 -0800 2008
commit  39c5237fbbaf832aa14eb6af436c5909c141e637
tree    03c9ddeb6101b70e41fb2ba547b123e869f2650a
parent  d94038ab3af70ce0ac51b39a78dab428e2daf381
...
36
37
38
39
 
40
41
42
...
36
37
38
 
39
40
41
42
0
@@ -36,7 +36,7 @@ module Ambition
0
         end
0
 
0
         def size
0
- raise "Example: owner.count(to_hash)"
0
+ raise "Not implemented yet."
0
         end
0
 
0
         def to_hash
...
36
37
38
39
40
 
 
41
42
43
...
54
55
56
57
 
58
59
60
61
62
63
64
65
66
67
...
36
37
38
 
 
39
40
41
42
43
...
54
55
56
 
57
58
59
60
 
 
 
 
61
62
63
0
@@ -36,8 +36,8 @@ context 'AmbitiousSphinx Adapter :: Select' do
0
   end
0
 
0
   specify 'Ruby =~ with string' do
0
- translator = User.select {|m| m.name =~ 'chris'}
0
- translator.to_s.should == %Q(name:"chris")
0
+ query = User.select {|m| m.name =~ 'chris'}.to_hash[:query]
0
+ query.should == %Q(name:"chris")
0
   end
0
   
0
   specify 'Ruby =~ with string' do
0
@@ -54,14 +54,10 @@ context 'AmbitiousSphinx Adapter :: Select' do
0
     query.should == %Q(name:"chris" AND NOT name:"jon")
0
   end
0
   
0
- specify 'Ruby !~ with Regexp' do
0
+ specify 'Ruby !~ with Regexp is not supported' do
0
     should.raise do User.select {|m| m.name !~ /chris/} end
0
   end
0
 
0
- xspecify '=~ with regexp flags' do
0
- should.raise do User.select {|m| m.name =~ /chris/i} end
0
- end
0
-
0
   xspecify 'downcase' do
0
     translator = User.select {|m| m.name.downcase =~ 'chris'}
0
     translator.to_s.should == %Q(foo)

Comments

    No one has commented yet.