mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
564b162015
With this we can perform new assertions on the returned value without having to cache it with an outer variable or wrapping all subsequent assertions inside the `assert_difference` block. Before: ``` post = nil assert_difference -> { Post.count }, 1 do Post.create end assert_predicate post, :persisted? ``` Now: ``` post = assert_difference -> { Post.count } do Post.create end assert_predicate post, :persisted? ``` |
||
---|---|---|
.. | ||
assertions.rb | ||
autorun.rb | ||
composite_filter.rb | ||
constant_lookup.rb | ||
declarative.rb | ||
deprecation.rb | ||
file_fixtures.rb | ||
isolation.rb | ||
method_call_assertions.rb | ||
setup_and_teardown.rb | ||
stream.rb | ||
tagged_logging.rb | ||
time_helpers.rb |