This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require "spec_helper" | |
RSpec.describe SchoolsIndex, chewy: true do | |
describe 'school model obersavation' do | |
it 'updates the index when a school is saved' do | |
school = FactoryGirl.build(:school) | |
expect { school.save! }.to update_index('schools') | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'chewy/rspec' | |
# Configure rspec to work with chewy | |
# | |
# By default, all chewy requests are ignored. This is important in case | |
# models (or factories by extension) contain after_commit hooks | |
# | |
# If a test or example group has chewy: true set on its metadata, then | |
# the example is run within the update strategy which immediately | |
# updates the index. Also, the index is purged before every test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if Rails.env.test? | |
# Setup test indexes with 'test' prefix and run synchronously by waiting for index updates | |
Chewy.settings = Chewy.settings.reverse_merge( | |
prefix: 'test', | |
wait_for_status: 'yellow' | |
) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(describe-variable 'evil-emacs-state-map) | |
#("evil-emacs-state-map is a variable defined in `evil-states.el'. | |
Its value is shown below. | |
This variable may be risky if used as a file-local variable. | |
Documentation: | |
Keymap for Emacs state. | |
Value: (keymap |
NewerOlder