Class | SeleniumOnRails::RSelenese |
In: |
lib/selenium_on_rails/rselenese.rb
|
Parent: | SeleniumOnRails::TestBuilder |
Renders Selenium test templates in a fashion analogous to rxml and rjs templates.
setup open :controller => 'customer', :action => 'list' assert_title 'Customers'
See SeleniumOnRails::TestBuilder for a list of available commands.
view | [RW] |
Render template using local_assigns.
# File lib/selenium_on_rails/rselenese.rb, line 23 23: def render template, local_assigns 24: title = (@view.assigns['page_title'] or local_assigns['page_title']) 25: table(title) do 26: test = self #to enable test.command 27: 28: assign_locals_code = '' 29: local_assigns.each_key {|key| assign_locals_code << "#{key} = local_assigns[#{key.inspect}];"} 30: 31: eval assign_locals_code + "\n" + template 32: end 33: end