diff options
| author | hukl <contact@smyck.org> | 2009-04-28 00:15:53 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-05-01 17:14:02 +0200 |
| commit | 4bd16f053847f2efe347ebda9136ef2233ee0d2c (patch) | |
| tree | f4c11f89455de991c8d87726d5757b752e7129e2 /vendor/plugins/thinking-sphinx/spec/unit/thinking_sphinx/index | |
| parent | d3a9b46ba5c863a0ff377dcffae9a494fe476e02 (diff) | |
added thinking_sphinx plugin for fulltext search on nodes and heads
Diffstat (limited to 'vendor/plugins/thinking-sphinx/spec/unit/thinking_sphinx/index')
| -rw-r--r-- | vendor/plugins/thinking-sphinx/spec/unit/thinking_sphinx/index/builder_spec.rb | 5 | ||||
| -rw-r--r-- | vendor/plugins/thinking-sphinx/spec/unit/thinking_sphinx/index/faux_column_spec.rb | 30 |
2 files changed, 35 insertions, 0 deletions
diff --git a/vendor/plugins/thinking-sphinx/spec/unit/thinking_sphinx/index/builder_spec.rb b/vendor/plugins/thinking-sphinx/spec/unit/thinking_sphinx/index/builder_spec.rb new file mode 100644 index 00000000..6d1d25dc --- /dev/null +++ b/vendor/plugins/thinking-sphinx/spec/unit/thinking_sphinx/index/builder_spec.rb | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | require 'spec/spec_helper' | ||
| 2 | |||
| 3 | describe ThinkingSphinx::Index::Builder do | ||
| 4 | # | ||
| 5 | end \ No newline at end of file | ||
diff --git a/vendor/plugins/thinking-sphinx/spec/unit/thinking_sphinx/index/faux_column_spec.rb b/vendor/plugins/thinking-sphinx/spec/unit/thinking_sphinx/index/faux_column_spec.rb new file mode 100644 index 00000000..ca76a346 --- /dev/null +++ b/vendor/plugins/thinking-sphinx/spec/unit/thinking_sphinx/index/faux_column_spec.rb | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | require 'spec/spec_helper' | ||
| 2 | |||
| 3 | describe ThinkingSphinx::Index::FauxColumn do | ||
| 4 | describe "coerce class method" do | ||
| 5 | before :each do | ||
| 6 | @column = ThinkingSphinx::Index::FauxColumn.stub_instance | ||
| 7 | ThinkingSphinx::Index::FauxColumn.stub_method(:new => @column) | ||
| 8 | end | ||
| 9 | |||
| 10 | it "should return a single faux column if passed a string" do | ||
| 11 | ThinkingSphinx::Index::FauxColumn.coerce("string").should == @column | ||
| 12 | end | ||
| 13 | |||
| 14 | it "should return a single faux column if passed a symbol" do | ||
| 15 | ThinkingSphinx::Index::FauxColumn.coerce(:string).should == @column | ||
| 16 | end | ||
| 17 | |||
| 18 | it "should return an array of faux columns if passed an array of strings" do | ||
| 19 | ThinkingSphinx::Index::FauxColumn.coerce(["one", "two"]).should == [ | ||
| 20 | @column, @column | ||
| 21 | ] | ||
| 22 | end | ||
| 23 | |||
| 24 | it "should return an array of faux columns if passed an array of symbols" do | ||
| 25 | ThinkingSphinx::Index::FauxColumn.coerce([:one, :two]).should == [ | ||
| 26 | @column, @column | ||
| 27 | ] | ||
| 28 | end | ||
| 29 | end | ||
| 30 | end \ No newline at end of file | ||
