aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/duration/iso8601_serializer.rb
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2016-07-10 22:02:12 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2016-07-10 22:02:12 +0200
commit333670ceb96e74399645fca3201969e63c3c403b (patch)
tree1b799b6ba8c6b6df018b3f4e3aec15ffd0b29ac4 /activesupport/lib/active_support/duration/iso8601_serializer.rb
parentdb1582ac342be68bf5addd1b770e7dec2abe44d2 (diff)
downloadrails-333670ceb96e74399645fca3201969e63c3c403b.tar.gz
rails-333670ceb96e74399645fca3201969e63c3c403b.tar.bz2
rails-333670ceb96e74399645fca3201969e63c3c403b.zip
Let TestResponse assign a parser.
Previously we'd only assign a response parser when a request came through Action Dispatch integration tests. This made calls to `parsed_body` when a TestResponse was manually instantiated — though own doing or perhaps from a framework — unintentionally blow up because no parser was set at that time. The response can lookup a parser entirely through its own ivars. Extract request encoder to its own file and assume that a viable content type is present at TestResponse instantiation. Since the default response parser is a no-op, making `parsed_body` equal to `body`, no exceptions will be thrown.
Diffstat (limited to 'activesupport/lib/active_support/duration/iso8601_serializer.rb')
0 files changed, 0 insertions, 0 deletions