Created
November 28, 2016 18:33
-
-
Save leonelgalan/b63d031ece0f3989185c087be3cea285 to your computer and use it in GitHub Desktop.
Example of lib/active_model_serializers/rspec.rb including ActiveModelSerializers::RSpecMatchers::Schema automatically.
This file contains 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
module ActiveModelSerializers | |
# @api public | |
# Container module for active_model_serializers specific matchers. | |
module RSpecMatchers | |
extend ActiveSupport::Autoload | |
autoload :Schema, 'active_model_serializers/rspec_matchers/schema' | |
end | |
end | |
RSpec.configure do |config| | |
config.include ActiveModelSerializers::RSpecMatchers::Schema, type: :request | |
config.include ActiveModelSerializers::RSpecMatchers::Schema, type: :controller | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Two
config.include ActiveModelSerializers::RSpecMatchers::Schema
because of rspec/rspec-rails#1349