Sha256: 4221aaf0257070853ce6eafd90e72312b00d74c80a87eae687335429b2753294

Contents?: true

Size: 1.05 KB

Versions: 41

Compression:

Stored size: 1.05 KB

Contents

class RjsSpecController < ApplicationController
  prepend_view_path File.join(File.dirname(__FILE__), "..", "views")
  
  def replace_html
  end
  
  def insert_html
  end
  
  def replace
  end
  
  def hide_div
  end
  
  def hide_page_element
  end

  def replace_html_with_partial
  end

  def render_replace_html
    render :update do |page|
      page.replace_html 'mydiv', 'replacement text'
      page.replace_html 'myotherdiv', 'other replacement text'
    end
  end
  
  def render_replace_html_with_partial
    render :update do |page|
      page.replace_html 'mydiv', :partial => 'rjs_spec/replacement_partial'
    end
  end
  
  def render_insert_html
    render :update do |page|
      page.insert_html 'mydiv', 'replacement text'
    end
  end
  
  def render_replace
    render :update do |page|
      page.replace 'mydiv', 'replacement text'
    end
  end
  
  def render_hide_div
    render :update do |page|
      page.hide 'mydiv'
    end
  end
  
  def render_hide_page_element
    render :update do |page|
      page['mydiv'].hide
    end
  end
end

Version data entries

41 entries across 41 versions & 9 rubygems

Version Path
cavalle-rspec-rails-1.2.2.0.1 spec/resources/controllers/rjs_spec_controller.rb
cavalle-rspec-rails-1.2.2.0.2 spec/resources/controllers/rjs_spec_controller.rb
cavalle-rspec-rails-1.2.3.1 spec/resources/controllers/rjs_spec_controller.rb
cavalle-rspec-rails-1.2.4.0.1 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.99.1 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.99.13 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.99.2 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.99.3 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.99.4 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.99.5 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.99.6 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.99.7 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.99.8 spec/resources/controllers/rjs_spec_controller.rb
dchelimsky-rspec-rails-1.1.99.9 spec/resources/controllers/rjs_spec_controller.rb
mcmire-rspec-rails-1.1.99.9 spec/resources/controllers/rjs_spec_controller.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/rspec-rails-1.3.4/spec/resources/controllers/rjs_spec_controller.rb
richzhou-rspec-rails-1.3.4 spec/resources/controllers/rjs_spec_controller.rb
rspec-rails-1.3.4 spec/resources/controllers/rjs_spec_controller.rb
rspec-rails-1.3.3 spec/resources/controllers/rjs_spec_controller.rb
rspec-rails-1.3.3.rc spec/resources/controllers/rjs_spec_controller.rb