Permalink
Browse files

fixed activesupport version dependency

updated example page mixins for github site modifications
  • Loading branch information...
Luke Cunningham
Luke Cunningham committed Sep 2, 2010
1 parent f21030e commit bdc6159aeaf84b6f282a70610a9d41b72f6272e0
Showing with 15 additions and 8 deletions.
  1. +3 −3 Rakefile
  2. +9 −4 features/support/pages/page_with_github_search.rb
  3. +1 −1 gizmo.gemspec
  4. +2 −0 lib/gizmo.rb
View
@@ -17,7 +17,7 @@ begin
gem.add_development_dependency "metric_fu", ">= 1.3.0"
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
gem.add_dependency "nokogiri", ">= 1.4.1"
- gem.add_dependency "activesupport", ">= 2.3.5"
+ gem.add_dependency "activesupport", "~> 2.3.5"
gem.add_dependency "tilt", ">= 1.0.1"
end
Jeweler::GemcutterTasks.new
@@ -34,10 +34,10 @@ Spec::Rake::SpecTask.new(:spec) do |spec|
end
Spec::Rake::SpecTask.new(:rcov) do |spec|
- spec.libs << 'lib' << 'spec'
+ spec.libs << 'lib/gizmo'
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
- spec.rcov_opts = ['--failure-threshold', 100, '--exclude', 'features']
+ spec.rcov_opts = ['--failure-threshold', 100, '--exclude', 'features,.gems']
end
task :spec => :check_dependencies
@@ -3,13 +3,13 @@ module PageWithGithubSearch
include Gizmo::PageMixin
def valid?
- has_selector?("div.search")
+ has_selector?("form[action='/search']")
end
def search_form
element_struct do |form|
- form.container = @document.css("div.search")
- form.element = container= form.container.css("form")
+ form.container = @document.css("form[action='/search']")
+ form.element = container = form.container
form.input = container.css("input[name=q]")
form.submit = container.css("input[alt=search]")
end
@@ -24,9 +24,14 @@ def search_form
locate(element).click
end
+ define_action :submit_form do
+ evaluate_script("document.forms[0].submit()")
+ end
+
define_action :search do |query|
perform :enter_search_query, query
- perform :click_element, search_form.submit
+ # perform :click_element, search_form.submit
+ perform :submit_form
end
private
View
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Luke Cunningham", "Steven Holloway", "Sam Weller"]
- s.date = %q{2010-08-10}
+ s.date = %q{2010-09-02}
s.default_executable = %q{gizmo}
s.description = %q{gizmo is a simple page model testing framework used and sponsored by 'realestate.com.au'. The aim of the project is to DRY up your testing assertions by abstracting code that defines your page resulting in a consistent, easy to maintain test suit}
s.email = %q{luke@icaruswings.com}
View
@@ -1,5 +1,7 @@
require 'rubygems'
+
require 'active_support'
+
require 'nokogiri'
require 'tilt'
require 'term/ansicolor'

0 comments on commit bdc6159

Please sign in to comment.