aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/gems/rspec-rails-1.3.3/spec/resources/helpers
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2011-02-23 12:06:34 +0000
committerLouise Crow <louise.crow@gmail.com>2011-02-23 12:06:34 +0000
commit4cd0de91754f07afd0afb58d137b3adcf5a07611 (patch)
tree1a16f0c5af85f5e7561012b027545183584e15b8 /vendor/gems/rspec-rails-1.3.3/spec/resources/helpers
parent44b78c1cd78607434b3666f5391ba68da647583f (diff)
Removing rspec and rspec-rails plugins in favour of updated gems.
Diffstat (limited to 'vendor/gems/rspec-rails-1.3.3/spec/resources/helpers')
-rw-r--r--vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/addition_helper.rb5
-rw-r--r--vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/explicit_helper.rb46
-rw-r--r--vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/more_explicit_helper.rb5
-rw-r--r--vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/plugin_application_helper.rb6
-rw-r--r--vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/view_spec_helper.rb13
5 files changed, 75 insertions, 0 deletions
diff --git a/vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/addition_helper.rb b/vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/addition_helper.rb
new file mode 100644
index 000000000..14ad70c3e
--- /dev/null
+++ b/vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/addition_helper.rb
@@ -0,0 +1,5 @@
+module AdditionHelper
+ def plus(addend)
+ @addend + addend
+ end
+end
diff --git a/vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/explicit_helper.rb b/vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/explicit_helper.rb
new file mode 100644
index 000000000..f75d1ddcb
--- /dev/null
+++ b/vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/explicit_helper.rb
@@ -0,0 +1,46 @@
+module ExplicitHelper
+ def method_in_explicit_helper
+ "<div>This is text from a method in the ExplicitHelper</div>"
+ end
+
+ # this is an example of a method spec'able with eval_erb in helper specs
+ def prepend(arg, &block)
+ begin # rails edge after 2.1.0 eliminated need for block.binding
+ concat(arg) + block.call
+ rescue
+ concat(arg, block.binding) + block.call
+ end
+ end
+
+ def named_url
+ rspec_on_rails_specs_url
+ end
+
+ def named_path
+ rspec_on_rails_specs_path
+ end
+
+ def params_foo
+ params[:foo]
+ end
+
+ def session_foo
+ session[:foo]
+ end
+
+ def request_thing
+ request.thing
+ end
+
+ def flash_thing
+ flash[:thing]
+ end
+
+ def method_using_output_buffer
+ concat("the_text_from_concat")
+ end
+
+ def method_using_template
+ update_page { |p| p["#some_id"].replace_html "" }
+ end
+end
diff --git a/vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/more_explicit_helper.rb b/vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/more_explicit_helper.rb
new file mode 100644
index 000000000..7468741b2
--- /dev/null
+++ b/vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/more_explicit_helper.rb
@@ -0,0 +1,5 @@
+module MoreExplicitHelper
+ def method_in_more_explicit_helper
+ "<div>This is text from a method in the MoreExplicitHelper</div>"
+ end
+end
diff --git a/vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/plugin_application_helper.rb b/vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/plugin_application_helper.rb
new file mode 100644
index 000000000..2107d2218
--- /dev/null
+++ b/vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/plugin_application_helper.rb
@@ -0,0 +1,6 @@
+# Methods added to this helper will be available to all templates in the application.
+module ApplicationHelper
+ def method_in_plugin_application_helper
+ "<div>This is text from a method in the ApplicationHelper</div>"
+ end
+end
diff --git a/vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/view_spec_helper.rb b/vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/view_spec_helper.rb
new file mode 100644
index 000000000..b05fc53f7
--- /dev/null
+++ b/vendor/gems/rspec-rails-1.3.3/spec/resources/helpers/view_spec_helper.rb
@@ -0,0 +1,13 @@
+module ViewSpecHelper
+ def method_in_helper
+ "<div>This is text from a method in the ViewSpecHelper</div>"
+ end
+
+ def method_in_template_with_partial
+ "<div>method_in_template_with_partial in ViewSpecHelper</div>"
+ end
+
+ def method_in_partial
+ "<div>method_in_partial in ViewSpecHelper</div>"
+ end
+end