gizmo 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -17,7 +17,7 @@ begin
17
17
  gem.add_development_dependency "metric_fu", ">= 1.3.0"
18
18
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
19
19
  gem.add_dependency "nokogiri", ">= 1.4.1"
20
- gem.add_dependency "activesupport", ">= 2.3.5"
20
+ gem.add_dependency "activesupport", "~> 2.3.5"
21
21
  gem.add_dependency "tilt", ">= 1.0.1"
22
22
  end
23
23
  Jeweler::GemcutterTasks.new
@@ -34,10 +34,10 @@ Spec::Rake::SpecTask.new(:spec) do |spec|
34
34
  end
35
35
 
36
36
  Spec::Rake::SpecTask.new(:rcov) do |spec|
37
- spec.libs << 'lib' << 'spec'
37
+ spec.libs << 'lib/gizmo'
38
38
  spec.pattern = 'spec/**/*_spec.rb'
39
39
  spec.rcov = true
40
- spec.rcov_opts = ['--failure-threshold', 100, '--exclude', 'features']
40
+ spec.rcov_opts = ['--failure-threshold', 100, '--exclude', 'features,.gems']
41
41
  end
42
42
 
43
43
  task :spec => :check_dependencies
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -3,13 +3,13 @@ module PageWithGithubSearch
3
3
  include Gizmo::PageMixin
4
4
 
5
5
  def valid?
6
- has_selector?("div.search")
6
+ has_selector?("form[action='/search']")
7
7
  end
8
8
 
9
9
  def search_form
10
10
  element_struct do |form|
11
- form.container = @document.css("div.search")
12
- form.element = container= form.container.css("form")
11
+ form.container = @document.css("form[action='/search']")
12
+ form.element = container = form.container
13
13
  form.input = container.css("input[name=q]")
14
14
  form.submit = container.css("input[alt=search]")
15
15
  end
@@ -24,9 +24,14 @@ module PageWithGithubSearch
24
24
  locate(element).click
25
25
  end
26
26
 
27
+ define_action :submit_form do
28
+ evaluate_script("document.forms[0].submit()")
29
+ end
30
+
27
31
  define_action :search do |query|
28
32
  perform :enter_search_query, query
29
- perform :click_element, search_form.submit
33
+ # perform :click_element, search_form.submit
34
+ perform :submit_form
30
35
  end
31
36
 
32
37
  private
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{gizmo}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Luke Cunningham", "Steven Holloway", "Sam Weller"]
12
- s.date = %q{2010-08-10}
12
+ s.date = %q{2010-09-02}
13
13
  s.default_executable = %q{gizmo}
14
14
  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}
15
15
  s.email = %q{luke@icaruswings.com}
@@ -76,7 +76,7 @@ Gem::Specification.new do |s|
76
76
  s.add_development_dependency(%q<capybara>, [">= 0.3.5"])
77
77
  s.add_development_dependency(%q<metric_fu>, [">= 1.3.0"])
78
78
  s.add_runtime_dependency(%q<nokogiri>, [">= 1.4.1"])
79
- s.add_runtime_dependency(%q<activesupport>, [">= 2.3.5"])
79
+ s.add_runtime_dependency(%q<activesupport>, ["~> 2.3.5"])
80
80
  s.add_runtime_dependency(%q<tilt>, [">= 1.0.1"])
81
81
  else
82
82
  s.add_dependency(%q<rspec>, [">= 1.3.0"])
@@ -85,7 +85,7 @@ Gem::Specification.new do |s|
85
85
  s.add_dependency(%q<capybara>, [">= 0.3.5"])
86
86
  s.add_dependency(%q<metric_fu>, [">= 1.3.0"])
87
87
  s.add_dependency(%q<nokogiri>, [">= 1.4.1"])
88
- s.add_dependency(%q<activesupport>, [">= 2.3.5"])
88
+ s.add_dependency(%q<activesupport>, ["~> 2.3.5"])
89
89
  s.add_dependency(%q<tilt>, [">= 1.0.1"])
90
90
  end
91
91
  else
@@ -95,7 +95,7 @@ Gem::Specification.new do |s|
95
95
  s.add_dependency(%q<capybara>, [">= 0.3.5"])
96
96
  s.add_dependency(%q<metric_fu>, [">= 1.3.0"])
97
97
  s.add_dependency(%q<nokogiri>, [">= 1.4.1"])
98
- s.add_dependency(%q<activesupport>, [">= 2.3.5"])
98
+ s.add_dependency(%q<activesupport>, ["~> 2.3.5"])
99
99
  s.add_dependency(%q<tilt>, [">= 1.0.1"])
100
100
  end
101
101
  end
@@ -1,5 +1,7 @@
1
1
  require 'rubygems'
2
+
2
3
  require 'active_support'
4
+
3
5
  require 'nokogiri'
4
6
  require 'tilt'
5
7
  require 'term/ansicolor'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gizmo
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Luke Cunningham
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-08-10 00:00:00 +10:00
20
+ date: 2010-09-02 00:00:00 +10:00
21
21
  default_executable: gizmo
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -122,7 +122,7 @@ dependencies:
122
122
  requirement: &id007 !ruby/object:Gem::Requirement
123
123
  none: false
124
124
  requirements:
125
- - - ">="
125
+ - - ~>
126
126
  - !ruby/object:Gem::Version
127
127
  hash: 9
128
128
  segments: