Module: RSpecApi::Expectations::Response::Body::Filter

Defined in:
lib/rspec-api/expectations/body/filter.rb

Instance Method Summary collapse

Instance Method Details

#expect_a_filtered(response, expectations = {}) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/rspec-api/expectations/body/filter.rb', line 8

def expect_a_filtered(response, expectations = {})
  include RSpecApi::Matchers

  if should_check_filtered(response, expectations)
    it { expect(response).to be_filtered expectations[:filter] }
  end
end