diff options
author | Louise Crow <louise.crow@gmail.com> | 2011-02-23 12:06:34 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2011-02-23 12:06:34 +0000 |
commit | 4cd0de91754f07afd0afb58d137b3adcf5a07611 (patch) | |
tree | 1a16f0c5af85f5e7561012b027545183584e15b8 /vendor/plugins/rspec-rails/spec/resources/controllers | |
parent | 44b78c1cd78607434b3666f5391ba68da647583f (diff) |
Removing rspec and rspec-rails plugins in favour of updated gems.
Diffstat (limited to 'vendor/plugins/rspec-rails/spec/resources/controllers')
7 files changed, 0 insertions, 301 deletions
diff --git a/vendor/plugins/rspec-rails/spec/resources/controllers/action_view_base_spec_controller.rb b/vendor/plugins/rspec-rails/spec/resources/controllers/action_view_base_spec_controller.rb deleted file mode 100644 index 924022178..000000000 --- a/vendor/plugins/rspec-rails/spec/resources/controllers/action_view_base_spec_controller.rb +++ /dev/null @@ -1,2 +0,0 @@ -class ActionViewBaseSpecController < ActionController::Base -end diff --git a/vendor/plugins/rspec-rails/spec/resources/controllers/application.rb b/vendor/plugins/rspec-rails/spec/resources/controllers/application.rb deleted file mode 100644 index 343fdd7bc..000000000 --- a/vendor/plugins/rspec-rails/spec/resources/controllers/application.rb +++ /dev/null @@ -1,9 +0,0 @@ -class ApplicationController < ActionController::Base - before_filter :i_should_only_be_run_once, - :only => 'action_with_inherited_before_filter' - - def i_should_only_be_run_once - true - end - private :i_should_only_be_run_once -end
\ No newline at end of file diff --git a/vendor/plugins/rspec-rails/spec/resources/controllers/controller_spec_controller.rb b/vendor/plugins/rspec-rails/spec/resources/controllers/controller_spec_controller.rb deleted file mode 100644 index d5b5627d1..000000000 --- a/vendor/plugins/rspec-rails/spec/resources/controllers/controller_spec_controller.rb +++ /dev/null @@ -1,127 +0,0 @@ -class ControllerSpecController < ActionController::Base - before_filter :raise_error, :only => :action_with_skipped_before_filter - - def raise_error - raise "from a before filter" - end - - skip_before_filter :raise_error - - prepend_view_path File.join(File.dirname(__FILE__), "..", "views") - - def some_action - render :template => "template/that/does/not/actually/exist" - end - - def some_action_with_implied_template - end - - def action_with_template - render :template => "controller_spec/action_with_template" - end - - def action_which_sets_flash - flash[:flash_key] = "flash value" - render :text => "" - end - - def action_which_gets_session - raise "expected #{params[:session_key].inspect}\ngot #{session[:session_key].inspect}" unless (session[:session_key] == params[:expected]) - render :text => "" - end - - def action_which_sets_session - session[:session_key] = "session value" - end - - def action_which_gets_cookie - raise "expected #{params[:expected].inspect}, got #{cookies[:cookie_key].inspect}" unless (cookies[:cookie_key] == params[:expected]) - render :text => "" - end - - def action_which_sets_cookie - cookies['cookie_key'] = params[:value] - render :text => "" - end - - def action_with_partial - render :partial => "controller_spec/partial" - end - - def action_with_partial_with_object - render :partial => "controller_spec/partial", :object => params[:thing] - end - - def action_with_partial_with_locals - render :partial => "controller_spec/partial", :locals => {:thing => params[:thing]} - end - - def action_with_errors_in_template - render :template => "controller_spec/action_with_errors_in_template" - end - - def action_setting_the_assigns_hash - @indirect_assigns_key = :indirect_assigns_key_value - end - - def action_setting_flash_after_session_reset - reset_session - flash[:after_reset] = "available" - end - - def action_setting_flash_before_session_reset - flash[:before_reset] = 'available' - reset_session - end - - def action_with_render_update - render :update do |page| - page.replace :bottom, 'replace_me', - :partial => 'non_existent_partial' - end - end - - def action_with_skipped_before_filter - render :text => "" - end - - def action_that_renders_inline - render :inline => "<%= 'inline code' %>" - end - - def action_that_assigns_false_to_a_variable - @a_variable = false - render :text => "" - end - - def action_with_two_arg_render - render :update, :status => 404 do |page| - page.visual_effect :highlight, 'user_list' - end - end - - class RescuedError < Exception; end - class UnRescuedError < Exception; end - - rescue_from RescuedError do |e| - render :text => 'Rescued!' - end - - def rescued_error_action - raise ControllerSpecController::RescuedError - end - - def un_rescued_error_action - raise ControllerSpecController::UnRescuedError - end - - def action_that_returns_headers - render :text => request.headers[params[:header]] - end -end - -class ControllerInheritingFromApplicationControllerController < ApplicationController - def action_with_inherited_before_filter - render :text => "" - end -end diff --git a/vendor/plugins/rspec-rails/spec/resources/controllers/example.txt b/vendor/plugins/rspec-rails/spec/resources/controllers/example.txt deleted file mode 100644 index 380965314..000000000 --- a/vendor/plugins/rspec-rails/spec/resources/controllers/example.txt +++ /dev/null @@ -1 +0,0 @@ -This is an example file to download.
\ No newline at end of file diff --git a/vendor/plugins/rspec-rails/spec/resources/controllers/redirect_spec_controller.rb b/vendor/plugins/rspec-rails/spec/resources/controllers/redirect_spec_controller.rb deleted file mode 100644 index 7b63c99f2..000000000 --- a/vendor/plugins/rspec-rails/spec/resources/controllers/redirect_spec_controller.rb +++ /dev/null @@ -1,70 +0,0 @@ -class RedirectSpecController < ApplicationController - - def action_with_no_redirect - render :text => "this is just here to keep this from causing a MissingTemplate error" - end - - def action_with_redirect_to_somewhere - redirect_to :action => 'somewhere' - end - - def action_with_redirect_to_other_somewhere - redirect_to :controller => 'render_spec', :action => 'text_action' - end - - def action_with_redirect_to_somewhere_and_return - redirect_to :action => 'somewhere' and return - render :text => "this is after the return" - end - - def somewhere - render :text => "this is just here to keep this from causing a MissingTemplate error" - end - - def action_with_redirect_to_rspec_site - redirect_to "http://rspec.rubyforge.org" - end - - def action_with_redirect_back - redirect_to :back - end - - def action_with_redirect_in_respond_to - respond_to do |wants| - wants.html { redirect_to :action => 'somewhere' } - end - end - - def action_with_redirect_which_creates_query_string - redirect_to :action => "somewhere", :id => 1111, :param1 => "value1", :param2 => "value2" - end - - # note: sometimes this is the URL which rails will generate from the hash in - # action_with_redirect_which_creates_query_string - def action_with_redirect_with_query_string_order1 - redirect_to "http://test.host/redirect_spec/somewhere/1111?param1=value1¶m2=value2" - end - - # note: sometimes this is the URL which rails will generate from the hash in - # action_with_redirect_which_creates_query_string - def action_with_redirect_with_query_string_order2 - redirect_to "http://test.host/redirect_spec/somewhere/1111?param2=value2¶m1=value1" - end - - def action_with_redirect_to_unroutable_url_inside_app - redirect_to :controller => "nonexistant", :action => "none" - end - - def action_with_method_restriction - render :text => '' - end - - def action_to_redirect_to_action_with_method_restriction - redirect_to :action => 'action_with_method_restriction' - end - - def action_with_redirect_to_somewhere_with_status - redirect_to :action => 'somewhere', :status => 301 - end -end - diff --git a/vendor/plugins/rspec-rails/spec/resources/controllers/render_spec_controller.rb b/vendor/plugins/rspec-rails/spec/resources/controllers/render_spec_controller.rb deleted file mode 100644 index 1efe61ff8..000000000 --- a/vendor/plugins/rspec-rails/spec/resources/controllers/render_spec_controller.rb +++ /dev/null @@ -1,34 +0,0 @@ -class RenderSpecController < ApplicationController - prepend_view_path File.join(File.dirname(__FILE__), "..", "views") - - def some_action - respond_to do |format| - format.html - format.js - end - end - - def action_which_renders_template_from_other_controller - render :template => 'controller_spec/action_with_template' - end - - def text_action - render :text => "this is the text for this action" - end - - def action_with_redirect - redirect_to :action => :some_action - end - - def action_with_partial - render :partial => "a_partial" - end - - def action_that_renders_nothing - render :nothing => true - end - - def action_with_alternate_layout - render :layout => 'simple' - end -end diff --git a/vendor/plugins/rspec-rails/spec/resources/controllers/rjs_spec_controller.rb b/vendor/plugins/rspec-rails/spec/resources/controllers/rjs_spec_controller.rb deleted file mode 100644 index 4fd9a41c0..000000000 --- a/vendor/plugins/rspec-rails/spec/resources/controllers/rjs_spec_controller.rb +++ /dev/null @@ -1,58 +0,0 @@ -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 |