module RSpecApi::Expectations::Response::Body::Jsonp
Public Instance Methods
expect_a_callback_wrapped(response, expectations = {})
click to toggle source
# File lib/rspec-api/expectations/body/jsonp.rb, line 8 def expect_a_callback_wrapped(response, expectations = {}) include RSpecApi::Matchers if should_check_callback_wrapped(response, expectations) it { expect(response).to be_wrapped_in_callback expectations[:callback] } end end
Private Instance Methods
should_check_callback_wrapped(response, expectations)
click to toggle source
# File lib/rspec-api/expectations/body/jsonp.rb, line 18 def should_check_callback_wrapped(response, expectations) expectations.key?(:callback) end