Skip to content
This repository has been archived by the owner on Jan 10, 2019. It is now read-only.

Commit

Permalink
fixed activesupport version dependency
Browse files Browse the repository at this point in the history
updated example page mixins for github site modifications
  • Loading branch information
Luke Cunningham committed Sep 2, 2010
1 parent f21030e commit bdc6159
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Rakefile
Expand Up @@ -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
Expand All @@ -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
Expand Down
13 changes: 9 additions & 4 deletions features/support/pages/page_with_github_search.rb
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gizmo.gemspec
Expand Up @@ -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}
Expand Down
2 changes: 2 additions & 0 deletions lib/gizmo.rb
@@ -1,5 +1,7 @@
require 'rubygems'

require 'active_support'

require 'nokogiri'
require 'tilt'
require 'term/ansicolor'
Expand Down

0 comments on commit bdc6159

Please sign in to comment.