nofxx-watircuke 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -5,7 +5,7 @@ Webrat & Watir Family common (and some cool) steps as a gem.
5
5
 
6
6
  == Install
7
7
 
8
- Cucumber:: http://wiki.github.com/aslakhellesoy/cucumber/install
8
+ Cucumber 0.3.11.6+:: http://wiki.github.com/aslakhellesoy/cucumber/install
9
9
  Watir ~ Firewatir ~ Safariwatir:: http://wtr.rubyforge.org/install.html
10
10
 
11
11
 
@@ -23,8 +23,8 @@ Watir ~ Firewatir ~ Safariwatir:: http://wtr.rubyforge.org/install.html
23
23
 
24
24
  cucumber.yml
25
25
 
26
- default: -r features/support/env.rb -r features/support/webrat.rb -r features/step_definitions
27
- watir: -r features/support/env.rb -r features/support/watir.rb -r features/step_definitions -t watir
26
+ default: CUC_ENV=webrat -r features/support/env.rb features/step_definitions features -t ~watir
27
+ watir: CUC_ENV=watir -r features/support/env.rb features/step_definitions features -t watir
28
28
 
29
29
 
30
30
  support/env.rb
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
data/cucumber.yml CHANGED
@@ -1,2 +1,2 @@
1
- default: CUC_ENV=watir -r features/support/env.rb features -t ~webrat
2
- webrat: CUC_ENV=webrat -r features/support/env.rb features -t webrat
1
+ default: CUC_ENV=watir -r features/support/env.rb features/step_definitions features -t ~webrat
2
+ webrat: CUC_ENV=webrat -r features/support/env.rb features/step_definitions features -t webrat
@@ -0,0 +1,6 @@
1
+ Feature: Search
2
+
3
+ Scenario: Search
4
+ Given I am on the watircuke page
5
+ And I conduct a "regular" search for "techrigy"
6
+
@@ -0,0 +1,11 @@
1
+
2
+ class Search
3
+ Given /I conduct a "(.*)" search for (.*)/ do |action, text|
4
+ def action
5
+ @browser.text_field(:name, 'q').set(text)
6
+ @browser.button(:value, 'Search').click
7
+ end
8
+ end
9
+ end
10
+
11
+ Search.new.action
@@ -1,4 +1,5 @@
1
1
  require 'spec'
2
+ require File.expand_path(File.dirname(__FILE__) + '/paths')
2
3
 
3
4
  if ENV['CUC_ENV'] == 'webrat'
4
5
  require 'webrat/core/matchers'
@@ -11,9 +12,9 @@ else
11
12
  # sleep 1
12
13
  end
13
14
 
14
- # "after all"
15
- at_exit do
16
- @browser.close if @browser
17
- end
15
+ # FIXME: this doesn't work
16
+ # After do
17
+ # @browser.close if @browser
18
+ # end
18
19
 
19
20
  end
data/lib/watircuke.rb CHANGED
@@ -15,7 +15,7 @@ if ENV['FIREWATIR']
15
15
  Browser = FireWatir::Firefox
16
16
  else
17
17
  case RUBY_PLATFORM
18
- when /darwin|i686-linux/
18
+ when /darwin|linux/
19
19
  require 'firewatir'
20
20
  Browser = FireWatir::Firefox
21
21
  # require 'safariwatir'
@@ -105,7 +105,7 @@ When /^I press "([^\"]*)"$/ do |b|
105
105
  end
106
106
 
107
107
  When /^I fill in "([^\"]*)" with "([^\"]*)"$/ do |field, value|
108
- @browser.text_field(:name, field).set(value)
108
+ @browser.text_field(:name, field).set(value) rescue @browser.text_field(:id, field).set(value)
109
109
  end
110
110
 
111
111
  When /^I select "([^\"]*)" from "([^\"]*)"$/ do |value, id|
data/watircuke.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{watircuke}
5
- s.version = "0.3.2"
5
+ s.version = "0.3.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Rich Downie", "Marcos Piccinini"]
9
- s.date = %q{2009-06-19}
9
+ s.date = %q{2009-06-30}
10
10
  s.email = %q{x@nofxx.com}
11
11
  s.extra_rdoc_files = [
12
12
  "README.rdoc"
@@ -19,6 +19,8 @@ Gem::Specification.new do |s|
19
19
  "cucumber.yml",
20
20
  "features/ajax.feature",
21
21
  "features/sample.feature",
22
+ "features/search.feature",
23
+ "features/step_definitions/search.rb",
22
24
  "features/support/env.rb",
23
25
  "features/support/paths.rb",
24
26
  "lib/watircuke.rb",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nofxx-watircuke
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rich Downie
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-06-19 00:00:00 -07:00
13
+ date: 2009-06-30 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -30,6 +30,8 @@ files:
30
30
  - cucumber.yml
31
31
  - features/ajax.feature
32
32
  - features/sample.feature
33
+ - features/search.feature
34
+ - features/step_definitions/search.rb
33
35
  - features/support/env.rb
34
36
  - features/support/paths.rb
35
37
  - lib/watircuke.rb