Module: Woulda::ActsAsSolr::Macros
- Defined in:
- lib/woulda/acts_as_solr/macros.rb
Instance Method Summary collapse
Instance Method Details
#should_act_as_solr(opts = {}) ⇒ Object
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 38 39 40 41 42 43 44 45 46 |
# File 'lib/woulda/acts_as_solr/macros.rb', line 4 def should_act_as_solr(opts={}) klass = described_type associations = ([opts], :associations) associations ||= [] context "A #{klass.name}" do # should "include the ActsAsSolr::ParserMethods module" do # assert klass.included_modules.include?(ActsAsSolr::ParserMethods) # end # # should "include the ActsAsSolr::CommonMethods module" do # assert klass.included_modules.include?(ActsAsSolr::CommonMethods) # end # # should "include the ActsAsSolr::InstanceMethods module" do # assert klass.included_modules.include?(ActsAsSolr::InstanceMethods) # end # # should "be extended by the ActsAsSolr::ClassMethods module" do # assert klass.extended_by.include?(ActsAsSolr::ClassMethods) # end # # should "be extended by the ActsAsSolr::ParserMethods module" do # assert klass.extended_by.include?(ActsAsSolr::ParserMethods) # end # # should "be extended by the ActsAsSolr::CommonMethods module" do # assert klass.extended_by.include?(ActsAsSolr::CommonMethods) # end # # should "be extended by the ActsAsSolr::PaginationExtension module" do # assert klass.extended_by.include?(ActsAsSolr::PaginationExtension) # end associations.each do |association| should "include the #{association.to_s} association in solr indexing" do klass.configuration[:include].include?(association) end end end end |