diff options
author | Tobias Lütke <tobias.luetke@gmail.com> | 2007-06-01 20:20:19 +0000 |
---|---|---|
committer | Tobias Lütke <tobias.luetke@gmail.com> | 2007-06-01 20:20:19 +0000 |
commit | 13058b018861053be8bf5dbec4cafe51b89e173f (patch) | |
tree | 8042495855f9ba31d192eba869307b4624772a9b /activesupport/test | |
parent | 4d1c87a069d0e13347f28ff9ce4db2427efe18b1 (diff) | |
download | rails-13058b018861053be8bf5dbec4cafe51b89e173f.tar.gz rails-13058b018861053be8bf5dbec4cafe51b89e173f.tar.bz2 rails-13058b018861053be8bf5dbec4cafe51b89e173f.zip |
Enhance assert_difference to accept arrays of strings which are then evaled
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6926 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/test_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/test_test.rb b/activesupport/test/test_test.rb index b1d916d5c0..944b98f529 100644 --- a/activesupport/test/test_test.rb +++ b/activesupport/test/test_test.rb @@ -53,4 +53,10 @@ class AssertDifferenceTest < Test::Unit::TestCase assert_difference('local_scope; @object.num') { @object.increment } end end + + def test_array_of_expressions + assert_difference [ '@object.num', '@object.num + 1' ], +1 do + @object.increment + end + end end |