tchandy-watircuke 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ .DS_Store
2
+ pkg/
data/README.rdoc ADDED
@@ -0,0 +1,62 @@
1
+ = Watircuke
2
+
3
+ Webrat & Watir Family common (and some cool) steps as a gem.
4
+
5
+
6
+ == Install
7
+
8
+ Cucumber:: http://wiki.github.com/aslakhellesoy/cucumber/install
9
+ Watir ~ Firewatir ~ Safariwatir:: http://wtr.rubyforge.org/install.html
10
+
11
+
12
+ == Use
13
+
14
+ * Remove step_definitions/webrat_steps.rb if you have it.
15
+
16
+ * In the scenarios you want to run watir, just add the @watir tag before.
17
+
18
+ * Run `cucumber` for webrat and `cucumber -p watir` for some Watir =D
19
+
20
+
21
+ == Rails Sample
22
+
23
+
24
+ cucumber.yml
25
+
26
+ default: CUC_ENV=webrat -r features/support/env.rb features -t ~watir
27
+ watir: CUC_ENV=watir -r features/support/env.rb features -t watir
28
+
29
+
30
+ support/env.rb
31
+
32
+ ENV["RAILS_ENV"] ||= "cucumber"
33
+ require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
34
+ require 'cucumber/rails/world'
35
+ require 'cucumber/formatter/unicode' # Comment out this line if you don't want Cucumber Unicode support
36
+ Cucumber::Rails.use_transactional_fixtures
37
+ Cucumber::Rails.bypass_rescue # Comment out this line if you want Rails own error handling
38
+
39
+ if ENV['CUC_ENV'] == 'watir'
40
+ require 'watircuke'
41
+ Before do
42
+ @environment = "http://localhost:3000/
43
+ sleep 1
44
+ end
45
+ # optional
46
+ # at_exit do
47
+ # @browser.close
48
+ # end
49
+ else
50
+ require 'webrat'
51
+ Webrat.configure do |config|
52
+ config.mode = :rails
53
+ end
54
+ require 'cucumber/rails/rspec'
55
+ require 'webrat/core/matchers'
56
+ require 'webratcuke'
57
+ end
58
+
59
+
60
+ == ABOUT
61
+
62
+ **cukewatir maximizes the Gherkin speak and minimizes the Watir code.
data/Rakefile ADDED
@@ -0,0 +1,48 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "watircuke"
8
+ gem.summary = "Watir steps for cucumber"
9
+ gem.email = "x@nofxx.com"
10
+ gem.homepage = "http://github.com/nofxx/watircuke"
11
+ gem.authors = ["Rich Downie", "Marcos Piccinini"]
12
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
13
+ end
14
+
15
+ rescue LoadError
16
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
17
+ end
18
+
19
+ require 'spec/rake/spectask'
20
+ Spec::Rake::SpecTask.new(:spec) do |spec|
21
+ spec.libs << 'lib' << 'spec'
22
+ spec.spec_files = FileList['spec/**/*_spec.rb']
23
+ end
24
+
25
+ Spec::Rake::SpecTask.new(:rcov) do |spec|
26
+ spec.libs << 'lib' << 'spec'
27
+ spec.pattern = 'spec/**/*_spec.rb'
28
+ spec.rcov = true
29
+ end
30
+
31
+
32
+ task :default => :spec
33
+
34
+ require 'rake/rdoctask'
35
+ Rake::RDocTask.new do |rdoc|
36
+ if File.exist?('VERSION.yml')
37
+ config = YAML.load(File.read('VERSION.yml'))
38
+ version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
39
+ else
40
+ version = ""
41
+ end
42
+
43
+ rdoc.rdoc_dir = 'rdoc'
44
+ rdoc.title = "watircuke #{version}"
45
+ rdoc.rdoc_files.include('README*')
46
+ rdoc.rdoc_files.include('lib/**/*.rb')
47
+ end
48
+
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.4
data/cucumber.yml ADDED
@@ -0,0 +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
@@ -0,0 +1,15 @@
1
+ Feature: Ajax
2
+
3
+ @watir
4
+ Scenario: ajaxy test
5
+ Given I am on the watircuke page
6
+ And I click "download_button"
7
+ And I wait until "facebox"
8
+ And I wait until "archives"
9
+ Then I should see "Download richdownie/watircuke at master "
10
+
11
+ @watir
12
+ Scenario: ajaxy search
13
+ Given I am on bing
14
+ And I fill in "q" with "cucu"
15
+ Then I should see "cucumber"
@@ -0,0 +1,11 @@
1
+ Feature: Github
2
+
3
+ Scenario: search for cucumber at github
4
+ Given I am on the cucumber page
5
+ Then I should see "BDD that talks to domain experts first and code second"
6
+ When I fill in "q" with "watircuke"
7
+ And I press "Search"
8
+ And I select "Code" from "type_value"
9
+ Then I should see "Repositories"
10
+ When I follow "richdownie / watircuke"
11
+ Then I should see "H30 (watir, safariwatir, firewatir)"
@@ -0,0 +1,20 @@
1
+ require 'spec'
2
+ require File.expand_path(File.dirname(__FILE__) + '/paths')
3
+
4
+ if ENV['CUC_ENV'] == 'webrat'
5
+ require 'webrat/core/matchers'
6
+ require File.expand_path(File.dirname(__FILE__) + '/../../lib/webratcuke')
7
+ else
8
+ require File.expand_path(File.dirname(__FILE__) + '/../../lib/watircuke')
9
+
10
+ Before do
11
+ @environment = "http://github.com/"
12
+ # sleep 1
13
+ end
14
+
15
+ # FIXME: this doesn't work
16
+ # After do
17
+ # @browser.close if @browser
18
+ # end
19
+
20
+ end
@@ -0,0 +1,25 @@
1
+ module NavigationHelpers
2
+ def path_to(page_name)
3
+ case page_name
4
+
5
+ when /the guides page/i
6
+ @environment + "guides/home"
7
+ when /the watircuke page/i
8
+ @environment + "richdownie/watircuke/tree/master"
9
+ when /the cucumber page/i
10
+ @environment + "aslakhellesoy/cucumber/tree/master"
11
+ when /the homepage/i
12
+ @environment
13
+ when /bing/i
14
+ "http://bing.com"
15
+
16
+ # Add more page name => path mappings here
17
+
18
+ else
19
+ raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
20
+ "Now, go and add a mapping in features/support/paths.rb"
21
+ end
22
+ end
23
+ end
24
+
25
+ World(NavigationHelpers)
@@ -0,0 +1,114 @@
1
+ module Watircuke
2
+ module Steps
3
+ module EN
4
+ #
5
+ # Browsing
6
+ #
7
+ Given /^I am on (.+)$/ do |page_name|
8
+ @browser.goto(path_to(page_name))
9
+ end
10
+
11
+ When /^I (visit|go to) the (.+)$/ do |_, text|
12
+ @browser.goto(@environment + text)
13
+ end
14
+
15
+ When /^I (click|follow) "([^\"]*)"$/ do |_, id|
16
+ link = @browser.link(:text, id).click rescue @browser.link(:id, id).click
17
+ end
18
+
19
+ Then /^I should be on (.+)$/ do |page_name|
20
+ URI.parse(@browser.url).path.should == path_to(page_name)
21
+ end
22
+
23
+ #
24
+ # Should see
25
+ #
26
+ #
27
+ Then /^I should see "([^\"]*)"$/ do |text|
28
+ @browser.contains_text(text).should be_true
29
+ end
30
+
31
+ Then /^I should not see "([^\"]*)"$/ do |text|
32
+ @browser.contains_text(text).should be_false
33
+ end
34
+
35
+ # Then /^I should see "([^\"]*)" (\d+) times*$/ do |text, count|
36
+ # res = @browser.body
37
+ # (count.to_i - 1).times { res.sub!(/#{text}/, "")}
38
+ # res.should contain(text)
39
+ # res.sub(/#{text}/, "").should_not contain(text)
40
+ # end
41
+
42
+ Given /I verify the page contains a div class "(.*)"/ do |byclass|
43
+ @browser.div(:class, byclass).exists?.should be_true
44
+ end
45
+
46
+ Given /I verify the page contains a div id "(.*)"/ do |id|
47
+ @browser.div(:id, id).exists?.should be_true
48
+ end
49
+
50
+ Given /I verify the page contains a link class "(.*)"/ do |byclass|
51
+ @browser.link(:class, byclass).exists?.should be_true
52
+ end
53
+
54
+ Given /I verify the page contains the image "(.*)"/ do |image|
55
+ @browser.image(:src, image).exists?.should be_true
56
+ end
57
+
58
+ Then /^the "([^\"]*)" checkbox should be checked$/ do |label|
59
+ @browser.checkbox(label).should be_checked
60
+ end
61
+
62
+ #
63
+ # Forms
64
+ #
65
+ #
66
+ When /^I press "([^\"]*)"$/ do |b|
67
+ @browser.button(:value, b).click
68
+ end
69
+
70
+ When /^I fill in "([^\"]*)" with "([^\"]*)"$/ do |field, value|
71
+ @browser.text_field(:name, field).set(value) rescue @browser.text_field(:id, field).set(value)
72
+ end
73
+
74
+ When /^I select "([^\"]*)" from "([^\"]*)"$/ do |value, id|
75
+ @browser.select_list(:id, id).select(value)
76
+ end
77
+
78
+ When /^I choose "([^\"]*)"$/ do |id|
79
+ @browser.radio(:id, id).click
80
+ end
81
+
82
+ When /^I check "([^\"]*)"$/ do |id|
83
+ @browser.checkbox(:id, id).click
84
+ end
85
+
86
+ When /^I uncheck "([^\"]*)"$/ do |id|
87
+ @browser.checkbox(field).clear
88
+ end
89
+
90
+ #
91
+ # Javascript
92
+ #
93
+ Given /From the "(.*)" link I fire the "(.*)" event/ do |text, event|
94
+ @browser.link(:text , text).fire_event(event)
95
+ end
96
+
97
+ Given /I click the "(.*)" span/ do |text|
98
+ @browser.span(:text, text).click
99
+ end
100
+
101
+ Given /I wait (\d+) seconds*/ do |time|
102
+ sleep time.to_i
103
+ end
104
+
105
+ Given /^I wait until "([^\"]*)"$/ do |div|
106
+ 7.times do |i|
107
+ break if @browser.div(:id, div).exists?
108
+ i == 7 ? raise(Watir::Exception::UnknownObjectException) : sleep(1)
109
+ end
110
+ end
111
+
112
+ end
113
+ end
114
+ end
@@ -0,0 +1,114 @@
1
+ # -*- coding: utf-8 -*-
2
+ module Watircuke
3
+ module Steps
4
+ module PT
5
+ #
6
+ # Navegando
7
+ #
8
+ Given /^Eu estou em (.+)$/ do |page_name|
9
+ @browser.goto(path_to(page_name))
10
+ end
11
+
12
+ When /^Eu (visito|vou) para (.+)$/ do |_, text|
13
+ @browser.goto(@environment + text)
14
+ end
15
+
16
+ When /^Eu (clico|sigo) "([^\"]*)"$/ do |_, id|
17
+ link = @browser.link(:text, id).click rescue @browser.link(:id, id).click
18
+ end
19
+
20
+ Then /^Eu devo estar em (.+)$/ do |page_name|
21
+ URI.parse(@browser.url).path.should == path_to(page_name)
22
+ end
23
+
24
+ #
25
+ # Devo ver
26
+ #
27
+ #
28
+ Then /^Eu devo ver "([^\"]*)"$/ do |text|
29
+ @browser.contains_text(text).should be_true
30
+ end
31
+
32
+ Then /^Eu não devo ver "([^\"]*)"$/ do |text|
33
+ @browser.contains_text(text).should be_false
34
+ end
35
+
36
+ # Then /^I should see "([^\"]*)" (\d+) times*$/ do |text, count|
37
+ # res = @browser.body
38
+ # (count.to_i - 1).times { res.sub!(/#{text}/, "")}
39
+ # res.should contain(text)
40
+ # res.sub(/#{text}/, "").should_not contain(text)
41
+ # end
42
+
43
+ Given /Eu verifico que a página contêm uma div com a class "(.*)"/ do |byclass|
44
+ @browser.div(:class, byclass).exists?.should be_true
45
+ end
46
+
47
+ Given /Eu verifico que a página contêm uma div com a id "(.*)"/ do |id|
48
+ @browser.div(:id, id).exists?.should be_true
49
+ end
50
+
51
+ Given /Eu verifico que a página contêm um link com a class "(.*)"/ do |byclass|
52
+ @browser.link(:class, byclass).exists?.should be_true
53
+ end
54
+
55
+ Given /Eu verifico que a página contêm a imagem "(.*)"/ do |image|
56
+ @browser.image(:src, image).exists?.should be_true
57
+ end
58
+
59
+ Then /^o checkbox "([^\"]*)" deve estar marcado$/ do |label|
60
+ @browser.checkbox(label).should be_checked
61
+ end
62
+
63
+ #
64
+ # Formulários
65
+ #
66
+ #
67
+ When /^Eu pressiono "([^\"]*)"$/ do |b|
68
+ @browser.button(:value, b).click
69
+ end
70
+
71
+ When /^Eu preeencho "([^\"]*)" com "([^\"]*)"$/ do |field, value|
72
+ @browser.text_field(:name, field).set(value) rescue @browser.text_field(:id, field).set(value)
73
+ end
74
+
75
+ When /^Eu seleciono "([^\"]*)" em "([^\"]*)"$/ do |value, id|
76
+ @browser.select_list(:id, id).select(value)
77
+ end
78
+
79
+ When /^Eu seleciono "([^\"]*)"$/ do |id|
80
+ @browser.radio(:id, id).click
81
+ end
82
+
83
+ When /^Eu marco "([^\"]*)"$/ do |id|
84
+ @browser.checkbox(:id, id).click
85
+ end
86
+
87
+ When /^Eu desmarco "([^\"]*)"$/ do |id|
88
+ @browser.checkbox(field).clear
89
+ end
90
+
91
+ #
92
+ # Javascript
93
+ #
94
+ Given /Do link "(.*)" Eu chamo o evento "(.*)"/ do |text, event|
95
+ @browser.link(:text , text).fire_event(event)
96
+ end
97
+
98
+ Given /Eu clico no span "(.*)"/ do |text|
99
+ @browser.span(:text, text).click
100
+ end
101
+
102
+ Given /Eu espero por (\d+) segundos*/ do |time|
103
+ sleep time.to_i
104
+ end
105
+
106
+ Given /^Eu espero até "([^\"]*)"$/ do |div|
107
+ 7.times do |i|
108
+ break if @browser.div(:id, div).exists?
109
+ i == 7 ? raise(Watir::Exception::UnknownObjectException) : sleep(1)
110
+ end
111
+ end
112
+ end
113
+ end
114
+ end
@@ -0,0 +1,196 @@
1
+ # Watircuke
2
+ #
3
+ # Commonly used webrat steps
4
+ # http://github.com/brynary/webrat
5
+ #
6
+
7
+ #
8
+ # Browsing
9
+ #
10
+ #
11
+ Given /^I am on (.+)$/ do |page_name|
12
+ visit path_to(page_name)
13
+ end
14
+
15
+ When /^I go to (.+)$/ do |page_name|
16
+ visit path_to(page_name)
17
+ end
18
+
19
+ When /^I follow "([^\"]*)"$/ do |link|
20
+ click_link(link)
21
+ end
22
+
23
+ Then /^I should be on (.+)$/ do |page_name|
24
+ URI.parse(current_url).path.should == path_to(page_name)
25
+ end
26
+
27
+ #
28
+ # Should see
29
+ #
30
+ #
31
+ Then /^I should see "([^\"]*)"$/ do |text|
32
+ response.should contain(text)
33
+ end
34
+
35
+ Then /^I should not see "([^\"]*)"$/ do |text|
36
+ response.should_not contain(text)
37
+ end
38
+
39
+ Then /^I should see "([^\"]*)" (\d+) times*$/ do |text, count|
40
+ res = response.body
41
+ (count.to_i - 1).times { res.sub!(/#{text}/, "")}
42
+ res.should contain(text)
43
+ res.sub(/#{text}/, "").should_not contain(text)
44
+ end
45
+
46
+ Then /^the "([^\"]*)" field should contain "([^\"]*)"$/ do |field, value|
47
+ field_labeled(field).value.should =~ /#{value}/
48
+ end
49
+
50
+ Then /^the "([^\"]*)" field should not contain "([^\"]*)"$/ do |field, value|
51
+ field_labeled(field).value.should_not =~ /#{value}/
52
+ end
53
+
54
+ Then /^the "([^\"]*)" checkbox should be checked$/ do |label|
55
+ field_labeled(label).should be_checked
56
+ end
57
+
58
+ Then /^I should see a (\S+) in the (\S+)$/ do |element, containing_element|
59
+ response.should have_tag("##{containing_element} .#{element}")
60
+ end
61
+
62
+ Then /^I should see the (\S+) in the (\S+)$/ do |element, containing_element|
63
+ response.should have_tag("##{containing_element} ##{element}")
64
+ end
65
+
66
+ Then /^I should see (\d+) (\S+) in the (\S+)$/ do |count, element, containing_element|
67
+ response.should have_tag("##{containing_element} .#{element.singularize}",:count => count.to_i)
68
+ end
69
+
70
+ Then /^I should see (\d+) to (\d+) (\S+) in the (\S+)$/ do |min, max, element, containing_element|
71
+ response.should have_tag("##{containing_element} .#{element.singularize}",min.to_i..max.to_i)
72
+ end
73
+
74
+ Then /^the (\S+) in the (\S+) should contain (a|an|the) (\S+)$/ do |middle_element, outer_element, a, inner_element|
75
+ response.should have_tag("##{outer_element} .#{middle_element} .#{inner_element}")
76
+ end
77
+
78
+ Then /^I should see the (\S+)$/ do |element_id|
79
+ response.should have_tag("##{element_id}")
80
+ end
81
+
82
+ Then /^I should see (a|an) (\S+)$/ do |a, element_class|
83
+ response.should have_tag(".#{element_class}")
84
+ end
85
+
86
+
87
+ #
88
+ # Forms
89
+ #
90
+ #
91
+ When /^I press "([^\"]*)"$/ do |button|
92
+ click_button(button)
93
+ end
94
+
95
+ When /^I fill in "([^\"]*)" with "([^\"]*)"$/ do |field, value|
96
+ fill_in(field, :with => value)
97
+ end
98
+
99
+ When /^I select "([^\"]*)" from "([^\"]*)"$/ do |value, field|
100
+ select(value, :from => field)
101
+ end
102
+
103
+ # Use this step in conjunction with Rail's datetime_select helper. For example:
104
+ # When I select "December 25, 2008 10:00" as the date and time
105
+ When /^I select "([^\"]*)" as the date and time$/ do |time|
106
+ select_datetime(time)
107
+ end
108
+
109
+ When /^I (press|follow|check|uncheck|choose) "([^\"]*)" for (.*) whose (.*) is "([^\"]*)"$/ do |action, whatyouclick, class_name, var_name, value|
110
+ id = var_name == "id" ? value : eval("\"#{class_name}\".classify.constantize.find_by_#{var_name}(\"#{value}\").id.to_s")
111
+ within("tr[id=row_#{class_name}_#{id}]") do
112
+ case action
113
+ when "press" then click_button(whatyouclick)
114
+ when "follow" then click_link(whatyouclick)
115
+ when "check" then check(whatyouclick)
116
+ when "uncheck" then uncheck(whatyouclick)
117
+ when "choose" then uncheck(whatyouclick)
118
+ end
119
+ end
120
+ end
121
+
122
+
123
+ # Use this step when using multiple datetime_select helpers on a page or
124
+ # you want to specify which datetime to select. Given the following view:
125
+ # <%= f.label :preferred %><br />
126
+ # <%= f.datetime_select :preferred %>
127
+ # <%= f.label :alternative %><br />
128
+ # <%= f.datetime_select :alternative %>
129
+ # The following steps would fill out the form:
130
+ # When I select "November 23, 2004 11:20" as the "Preferred" date and time
131
+ # And I select "November 25, 2004 10:30" as the "Alternative" date and time
132
+ When /^I select "([^\"]*)" as the "([^\"]*)" date and time$/ do |datetime, datetime_label|
133
+ select_datetime(datetime, :from => datetime_label)
134
+ end
135
+
136
+ # Use this step in conjunction with Rail's time_select helper. For example:
137
+ # When I select "2:20PM" as the time
138
+ # Note: Rail's default time helper provides 24-hour time-- not 12 hour time. Webrat
139
+ # will convert the 2:20PM to 14:20 and then select it.
140
+ When /^I select "([^\"]*)" as the time$/ do |time|
141
+ select_time(time)
142
+ end
143
+
144
+ # Use this step when using multiple time_select helpers on a page or you want to
145
+ # specify the name of the time on the form. For example:
146
+ # When I select "7:30AM" as the "Gym" time
147
+ When /^I select "([^\"]*)" as the "([^\"]*)" time$/ do |time, time_label|
148
+ select_time(time, :from => time_label)
149
+ end
150
+
151
+ # Use this step in conjunction with Rail's date_select helper. For example:
152
+ # When I select "February 20, 1981" as the date
153
+ When /^I select "([^\"]*)" as the date$/ do |date|
154
+ select_date(date)
155
+ end
156
+
157
+ # Use this step when using multiple date_select helpers on one page or
158
+ # you want to specify the name of the date on the form. For example:
159
+ # When I select "April 26, 1982" as the "Date of Birth" date
160
+ When /^I select "([^\"]*)" as the "([^\"]*)" date$/ do |date, date_label|
161
+ select_date(date, :from => date_label)
162
+ end
163
+
164
+ When /^I choose "([^\"]*)"$/ do |field|
165
+ choose(field)
166
+ end
167
+
168
+ When /^I check "([^\"]*)"$/ do |field|
169
+ check(field)
170
+ end
171
+
172
+ When /^I uncheck "([^\"]*)"$/ do |field|
173
+ uncheck(field)
174
+ end
175
+
176
+ When /^I attach the file at "([^\"]*)" to "([^\"]*)"$/ do |path, field|
177
+ attach_file(field, path)
178
+ end
179
+
180
+
181
+ # Steps that are generally useful and help encourage use of semantic
182
+ # IDs and Class Names in your markup. In the steps below, a match following
183
+ # "the" will verify the presences of an element with a given ID while a match following
184
+ # "a" or "an" will verify the presence an element of a given class.
185
+ Then /^I debug$/ do
186
+ debugger
187
+ end
188
+
189
+ Then /^save_and_open_page$/ do
190
+ save_and_open_page
191
+ end
192
+
193
+ Then /^I wait for ([0-9]+) seconds$/ do |delay|
194
+ sleep delay.to_i
195
+ end
196
+
data/lib/watircuke.rb ADDED
@@ -0,0 +1,41 @@
1
+ #
2
+ # Watircuke
3
+ #
4
+ # Commonly used watir steps
5
+ #
6
+ #
7
+ require 'cucumber'
8
+ require 'spec'
9
+
10
+ #
11
+ # Environment
12
+ #
13
+ if ENV['FIREWATIR']
14
+ require 'firewatir'
15
+ Browser = FireWatir::Firefox
16
+ else
17
+ case RUBY_PLATFORM
18
+ when /darwin/
19
+ require 'firewatir'
20
+ Browser = FireWatir::Firefox
21
+ when /linux/
22
+ require 'safariwatir'
23
+ Browser = Watir::Safari
24
+ when /win32|mingw/
25
+ require 'watir'
26
+ Browser = Watir::IE
27
+ when /java/
28
+ require 'celerity'
29
+ Browser = Celerity::Browser
30
+ else
31
+ raise "This platform is not supported (#{PLATFORM})"
32
+ end
33
+ end
34
+
35
+ #
36
+ # Cucumber
37
+ #
38
+ Before do
39
+ @browser = Browser.new
40
+ end
41
+
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ require 'spec'
3
+
4
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
5
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
+ require 'watircuke'
7
+
8
+ Spec::Runner.configure do |config|
9
+
10
+ end
@@ -0,0 +1,7 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Watircuke" do
4
+ it "should open ffox" do
5
+ puts "Opening ffox!"
6
+ end
7
+ end
data/watircuke.gemspec ADDED
@@ -0,0 +1,51 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{watircuke}
5
+ s.version = "0.4.1"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Rich Downie", "Marcos Piccinini", "Thiago Pradi"]
9
+ s.date = %q{2009-06-19}
10
+ s.email = %q{x@nofxx.com}
11
+ s.extra_rdoc_files = [
12
+ "README.rdoc"
13
+ ]
14
+ s.files = [
15
+ ".gitignore",
16
+ "README.rdoc",
17
+ "Rakefile",
18
+ "VERSION",
19
+ "cucumber.yml",
20
+ "features/ajax.feature",
21
+ "features/sample.feature",
22
+ "features/support/env.rb",
23
+ "features/support/paths.rb",
24
+ "lib/watircuke.rb",
25
+ "lib/steps/watircuke_en.rb",
26
+ "lib/steps/watircuke_pt.rb",
27
+ "lib/steps/webratcuke_en.rb",
28
+ "spec/spec_helper.rb",
29
+ "spec/watircuke_spec.rb",
30
+ "watircuke.gemspec"
31
+ ]
32
+ s.homepage = %q{http://github.com/tchandy/watircuke}
33
+ s.rdoc_options = ["--charset=UTF-8"]
34
+ s.require_paths = ["lib"]
35
+ s.rubygems_version = %q{1.3.4}
36
+ s.summary = %q{Watir steps for cucumber}
37
+ s.test_files = [
38
+ "spec/watircuke_spec.rb",
39
+ "spec/spec_helper.rb"
40
+ ]
41
+
42
+ if s.respond_to? :specification_version then
43
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
44
+ s.specification_version = 3
45
+
46
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
47
+ else
48
+ end
49
+ else
50
+ end
51
+ end
metadata ADDED
@@ -0,0 +1,71 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tchandy-watircuke
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.1
5
+ platform: ruby
6
+ authors:
7
+ - Rich Downie
8
+ - Marcos Piccinini
9
+ - Thiago Pradi
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+
14
+ date: 2009-06-19 00:00:00 -07:00
15
+ default_executable:
16
+ dependencies: []
17
+
18
+ description:
19
+ email: x@nofxx.com
20
+ executables: []
21
+
22
+ extensions: []
23
+
24
+ extra_rdoc_files:
25
+ - README.rdoc
26
+ files:
27
+ - .gitignore
28
+ - README.rdoc
29
+ - Rakefile
30
+ - VERSION
31
+ - cucumber.yml
32
+ - features/ajax.feature
33
+ - features/sample.feature
34
+ - features/support/env.rb
35
+ - features/support/paths.rb
36
+ - lib/watircuke.rb
37
+ - lib/steps/watircuke_en.rb
38
+ - lib/steps/watircuke_pt.rb
39
+ - lib/steps/webratcuke_en.rb
40
+ - spec/spec_helper.rb
41
+ - spec/watircuke_spec.rb
42
+ - watircuke.gemspec
43
+ has_rdoc: false
44
+ homepage: http://github.com/tchandy/watircuke
45
+ post_install_message:
46
+ rdoc_options:
47
+ - --charset=UTF-8
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: "0"
55
+ version:
56
+ required_rubygems_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: "0"
61
+ version:
62
+ requirements: []
63
+
64
+ rubyforge_project:
65
+ rubygems_version: 1.2.0
66
+ signing_key:
67
+ specification_version: 3
68
+ summary: Watir steps for cucumber
69
+ test_files:
70
+ - spec/watircuke_spec.rb
71
+ - spec/spec_helper.rb