Permalink
Browse files

adding rspec tests for section script evaluation and just enough code…

… to make them pass
  • Loading branch information...
1 parent eda5e6a commit 813d87a52370a819965ca14c9ef22f2e3b45b8b8 @natritmeyer committed Mar 16, 2012
Showing with 17 additions and 0 deletions.
  1. +8 −0 lib/site_prism/section.rb
  2. +9 −0 spec/section_spec.rb
@@ -13,6 +13,14 @@ def visible?
@root_element.visible?
end
+ def execute_script input
+
+ end
+
+ def evaluate_script input
+
+ end
+
private
# Section specific element finder
@@ -38,5 +38,14 @@ class YetAnotherPageWithASection < SitePrism::Page
it "should respond to elements" do
SitePrism::Section.should respond_to :elements
end
+
+ it "should respond to javascript methods" do
+ class JsSection < SitePrism::Section
+
+ end
+
+ JsSection.new("a").should respond_to :execute_script
+ JsSection.new("a").should respond_to :evaluate_script
+ end
end

0 comments on commit 813d87a

Please sign in to comment.