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
10 11 12 |
# File 'lib/response_dumper.rb', line 10 def self.define(name, &block) RailsResponseDumper::Defined.new(name, &block) end |
Instance Method Details
#app ⇒ Object
Delegates to ‘Rails.application`.
15 16 17 |
# File 'lib/response_dumper.rb', line 15 def app Rails.application end |
#inspect ⇒ Object
The list of methods is too long to be useful so shorten to just the class name.
45 46 47 |
# File 'lib/response_dumper.rb', line 45 def inspect "#<#{self.class.name}>" end |
#mock_setup ⇒ Object
23 24 25 |
# File 'lib/response_dumper.rb', line 23 def mock_setup RSpec::Mocks.setup end |
#mock_teardown ⇒ Object
27 28 29 30 31 |
# File 'lib/response_dumper.rb', line 27 def mock_teardown RSpec::Mocks.verify ensure RSpec::Mocks.teardown end |
#responses ⇒ Object
19 20 21 |
# File 'lib/response_dumper.rb', line 19 def responses @responses ||= [] end |