Module: Global

Defined in:
lib/rrx_dev/spec/global.rb

Class Method Summary collapse

Class Method Details

.included(other) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/rrx_dev/spec/global.rb', line 4

def self.included(other)
  other.let(:json_body) do
    JSON.parse(response.body, object_class: HashWithIndifferentAccess)
  end

  other.let(:json_response) do
    expect(response).to be_successful
    json_body
  end

  other.let(:json_error) do
    expect(response).not_to be_successful
    json_body
  end

end