Module: Sunspot::Rails::Spec::Extension
- Included in:
- ActiveSupport::TestCase
- Defined in:
- lib/sunspot/spec/extension.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/sunspot/spec/extension.rb', line 5 def self.included(base) base.class_eval do class_inheritable_accessor :sunspot_integration extend ClassMethods end end |
Instance Method Details
#integrate_sunspot? ⇒ Boolean
12 13 14 |
# File 'lib/sunspot/spec/extension.rb', line 12 def integrate_sunspot? self.class.integrate_sunspot? end |
#mock_sunspot ⇒ Object
16 17 18 19 20 |
# File 'lib/sunspot/spec/extension.rb', line 16 def mock_sunspot [ :index, :remove_from_index ].each do |method_name| Sunspot.stub!(method_name) end end |