diff options
author | Tim Haines <tmhaines@gmail.com> | 2008-08-29 22:09:51 +1200 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-08-29 20:51:47 +0200 |
commit | d0b949d87375ae351757adffd192d8cb1f3dbf8d (patch) | |
tree | 4c485a7daf4e3274e428407a53d14d2eabddeb14 /actionpack/lib/action_controller | |
parent | a200c67611ed3bb2d276a9a1d1eb67b5c926f22a (diff) | |
download | rails-d0b949d87375ae351757adffd192d8cb1f3dbf8d.tar.gz rails-d0b949d87375ae351757adffd192d8cb1f3dbf8d.tar.bz2 rails-d0b949d87375ae351757adffd192d8cb1f3dbf8d.zip |
Improve assert_select_rjs failure messages for show, hide, toggle, and remove
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#931 state:committed]
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/assertions/selector_assertions.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/assertions/selector_assertions.rb b/actionpack/lib/action_controller/assertions/selector_assertions.rb index 9114894b1d..2264d5d3a3 100644 --- a/actionpack/lib/action_controller/assertions/selector_assertions.rb +++ b/actionpack/lib/action_controller/assertions/selector_assertions.rb @@ -472,7 +472,13 @@ module ActionController matches else # RJS statement not found. - flunk args.shift || "No RJS statement that replaces or inserts HTML content." + case rjs_type + when :remove, :show, :hide, :toggle + flunk_message = "No RJS statement that #{rjs_type.to_s}s '#{id}' was rendered." + else + flunk_message = "No RJS statement that replaces or inserts HTML content." + end + flunk args.shift || flunk_message end end |