class AnyClass
Attributes
prefix[RW]
Public Class Methods
test_directory()
click to toggle source
# File lib/simple_javascript_testing.rb, line 11 def test_directory @test_directory || "test" end
test_directory=(dir)
click to toggle source
# File lib/simple_javascript_testing.rb, line 15 def test_directory=(dir) @test_directory = dir end
Public Instance Methods
build_html(template)
click to toggle source
# File lib/simple_javascript_testing.rb, line 20 def build_html(template) html = render :template => template, :layout => 'application' html end
include_helper(helper_name)
click to toggle source
Include an additional helper If being used in a rake task, you may need to require the file(s) Ex: require Rails.root.join(‘app’, ‘helpers’, ‘blog_pages_helper’)
# File lib/simple_javascript_testing.rb, line 28 def include_helper(helper_name) set_render_anywhere_helpers(helper_name) end
set_instance_variable_to(var, value)
click to toggle source
Apply an instance variable to the controller If you need to use instance variables instead of locals, just call this method as many times as you need.
# File lib/simple_javascript_testing.rb, line 34 def set_instance_variable_to(var, value) set_instance_variable(var, value) end