spec/thinking_sphinx_spec.rb in thinking-sphinx-1.3.6 vs spec/thinking_sphinx_spec.rb in thinking-sphinx-1.3.7
- old
+ new
@@ -1,7 +1,18 @@
require 'spec/spec_helper'
describe ThinkingSphinx do
+ describe '.context' do
+ it "should return a Context instance" do
+ ThinkingSphinx.context.should be_a(ThinkingSphinx::Context)
+ end
+
+ it "should remember changes to the Context instance" do
+ ThinkingSphinx.context.indexed_models.replace([:model])
+ ThinkingSphinx.context.indexed_models.should == [:model]
+ end
+ end
+
describe '.define_indexes?' do
it "should define indexes by default" do
ThinkingSphinx.define_indexes?.should be_true
end
end