Need to experiment if this priority is the best one: rendered => output_buffer

Methods

Class Public methods

new()

📝 Source code
# File actionview/lib/action_view/test_case.rb, line 307
        def initialize
          @rendered_views ||= Hash.new { |hash, key| hash[key] = [] }
        end
🔎 See on GitHub

Instance Public methods

add(view, locals)

📝 Source code
# File actionview/lib/action_view/test_case.rb, line 311
        def add(view, locals)
          @rendered_views[view] ||= []
          @rendered_views[view] << locals
        end
🔎 See on GitHub

locals_for(view)

📝 Source code
# File actionview/lib/action_view/test_case.rb, line 316
        def locals_for(view)
          @rendered_views[view]
        end
🔎 See on GitHub

rendered_views()

📝 Source code
# File actionview/lib/action_view/test_case.rb, line 320
        def rendered_views
          @rendered_views.keys
        end
🔎 See on GitHub

view_rendered?(view, expected_locals)

📝 Source code
# File actionview/lib/action_view/test_case.rb, line 324
        def view_rendered?(view, expected_locals)
          locals_for(view).any? do |actual_locals|
            expected_locals.all? { |key, value| value == actual_locals[key] }
          end
        end
🔎 See on GitHub