Module: KineticCafe::ErrorRSpec
- Extended by:
- RSpec::Matchers::DSL
- Defined in:
- lib/kinetic_cafe/error_rspec.rb
Overview
Provide a number of useful expectations against Kinetic Cafe errors. Enable these with:
require 'kinetic_cafe/error_rspec'
RSpec.configure do |c|
c.include KineticCafe::ErrorRSpec
end
be_json_for
-
Verifies that the expected value is a JSON representation of the actual value. If the actual value responds to #body, the actual value is replaced with
actual.body
. be_kc_error
-
Verifies that the expected value is a KineticCafe::Error.
be_kc_error_json
-
Verifies that the JSON value matches the output of KineticCafe::Error.
be_kc_error_html
-
Verifies that the rendered HTML matches the output of KineticCafe::Error.