Module: Committee::Rails::Test::Methods
- Includes:
- Test::Methods
- Defined in:
- lib/committee/rails/test/methods.rb
Instance Method Summary collapse
- #committee_options ⇒ Object
- #default_schema ⇒ Object
- #request_object ⇒ Object
- #response_data ⇒ Object
Instance Method Details
#committee_options ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/committee/rails/test/methods.rb', line 8 def if defined?(RSpec) && ( = RSpec.try(:configuration).try(:committee_options)) else { schema_path: default_schema } end end |
#default_schema ⇒ Object
16 17 18 |
# File 'lib/committee/rails/test/methods.rb', line 16 def default_schema @default_schema ||= Committee::Drivers.load_from_file(Rails.root.join('docs', 'schema', 'schema.json').to_s) end |
#request_object ⇒ Object
20 21 22 |
# File 'lib/committee/rails/test/methods.rb', line 20 def request_object integration_session.request end |
#response_data ⇒ Object
24 25 26 |
# File 'lib/committee/rails/test/methods.rb', line 24 def response_data [integration_session.response.status, integration_session.response.headers, integration_session.response.body] end |