public
Description: ultrasphinx's is_indexed rspec matcher
Homepage:
Clone URL: git://github.com/nando/be_indexed.git
be_indexed / README
100644 37 lines (26 sloc) 1.207 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
== BeIndexed matcher
 
  BeIndexed matcher is a custom RSpec matcher for RubyOnRails Ultrasphinx
indexation plugin.
 
  Currently only :field and :delta options are supported by the matcher.
 
  Spec examples:
    MyModel.should be_indexed
    MyModel.should be_indexed.using_fields([:column1, :column2])
    MyModel.should be_indexed.with_delta
    MyModel.should be_indexed.with_delta(:field => 'last_modified')
    MyModel.should be_indexed.using_fields(:column1).with_delta
 
  To used it you need to place the code at vendor/plugins and include
Spec::Ultrasphinx::Matchers the matcher in your specs.
 
  To include the matcher so it can be used in all your specs you can do the
following in your spec_helper.rb:
 
  Spec::Runner.configure do |config|
    config.include Spec::Ultrasphinx::Matchers
  end
 
== Thanks
  To Andrew Aksyonoff and the Sphinx contributors
(http://www.sphinxsearch.com/) for such a great indexer.
 
  To Evan Weaver (http://blog.evanweaver.com/) for writing such a nice RoR
plugin for Sphinx.
 
  To Fester (http://github.com/fester/) for giving me an example to follow
for writing my first RSpec matcher.
 
== Author
  Fernando Garcia Samblas (fernando.garcia.samblas@gmail.com)