Class: ResponseDumper
- Inherits:
-
Object
- Object
- ResponseDumper
- Includes:
- ActionDispatch::Integration::Runner, ActiveSupport::Testing::TimeHelpers, RSpec::Mocks::ExampleMethods
- Defined in:
- lib/response_dumper.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#app ⇒ Object
Delegates to ‘Rails.application`.
-
#inspect ⇒ Object
The list of methods is too long to be useful so shorten to just the class name.
- #mock_setup ⇒ Object
- #mock_teardown ⇒ Object
- #responses ⇒ Object
Class Method Details
.define(name, &block) ⇒ Object
11 12 13 |
# File 'lib/response_dumper.rb', line 11 def self.define(name, &block) RailsResponseDumper::Defined.new(name, &block) end |
Instance Method Details
#app ⇒ Object
Delegates to ‘Rails.application`.
16 17 18 |
# File 'lib/response_dumper.rb', line 16 def app Rails.application end |
#inspect ⇒ Object
The list of methods is too long to be useful so shorten to just the class name.
46 47 48 |
# File 'lib/response_dumper.rb', line 46 def inspect "#<#{self.class.name}>" end |
#mock_setup ⇒ Object
24 25 26 |
# File 'lib/response_dumper.rb', line 24 def mock_setup RSpec::Mocks.setup end |
#mock_teardown ⇒ Object
28 29 30 31 32 |
# File 'lib/response_dumper.rb', line 28 def mock_teardown RSpec::Mocks.verify ensure RSpec::Mocks.teardown end |
#responses ⇒ Object
20 21 22 |
# File 'lib/response_dumper.rb', line 20 def responses @responses ||= [] end |