sr-webrat 0.4.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/History.txt +343 -0
  2. data/MIT-LICENSE.txt +19 -0
  3. data/README.rdoc +85 -0
  4. data/Rakefile +164 -0
  5. data/install.rb +1 -0
  6. metadata +67 -0
@@ -0,0 +1,343 @@
1
+ == 0.4.5 / ?
2
+
3
+ * Major enhancements
4
+
5
+ * Improve performance (~2x) on JRuby by supporting Nokogiri
6
+
7
+ * Minor enhancements
8
+
9
+ * Added support for field_labeled_locators ending in non word characters
10
+ lh 148 (Zach Dennis)
11
+ * Filled in tests on click link lh 195 (diabolo)
12
+ * Added current_url to selenium session lh 215 (Luke Amdor)
13
+ * Added silence spec to selenium lh 238 (Martin Gamsjaeger aka snusnu)
14
+ * Added ability to configure the browser startup timeout for selenium lh 242 (Mike Gaffney, Mark Dodwell)
15
+ * Added delegation for field_named lh194 (pivotal labs)
16
+ * Added fix to keep from escaping field values in mechanize mode lh256 (jish)
17
+ * Adding fixes for click button/link and made the integration specs pass for the same in selenium lh254 (Ldiehl, Matthias Marschall)
18
+
19
+ == 0.4.4 / 2009-04-06
20
+
21
+ * Major enhancements
22
+
23
+ * Make selenium process management code more robust and informative
24
+
25
+ * Minor enhancements
26
+
27
+ * Add support for Rails javascript post links (Mark Menard)
28
+ * Upgrade selenium-client dependency to 1.2.14, and update for new waiting
29
+ API (Balint Erdi)
30
+ * Change default app environment from "selenium" to "test"
31
+
32
+ * Bug fixes
33
+
34
+ * Don't create a new instance of WWW::Mechanize for each request
35
+ (Mark Menard)
36
+ * Select fields with duplicate selected options sent an incorrect value (Noah Davis)
37
+
38
+ == 0.4.3 / 2009-03-17
39
+
40
+ * Minor enhancements
41
+
42
+ * Support Rails 2.3. Use Rack::Utils to parse params (Matthew Ford)
43
+ * Support for "modular" Sinatra app style (Simon Rozet)
44
+ * Initial Merb and Sinatra compatibility for Selenium mode (Corey Donohoe)
45
+ * When faced with a label with no for attribute, that contains a hidden field
46
+ and another field, as can be the case in Rails 2.3's checkbox view,
47
+ webrat now locates the non-hidden field. (Luke Melia)
48
+ * Add application_framework config for Selenium mode to determine how to
49
+ start and stop the app server (Corey Donohoe)
50
+
51
+ * Bug fixes
52
+
53
+ * Fix following of absolute redirect URL in Sinatra (Simon Rozet)
54
+
55
+ == 0.4.2 / 2009-02-24
56
+
57
+ * Major enhancements
58
+
59
+ * Significant improvements to have_selector. It now supports specifying
60
+ attributes in a hash and :count and :content options. See
61
+ have_selector_spec.rb for more.
62
+ * Add the same functionality mentioned above to have_xpath
63
+
64
+ * Minor enhancements
65
+
66
+ * Squeeze extra whitespace out of failures messages from contain
67
+ matcher
68
+ * Detect infinite redirects and raise a Webrat::InfiniteRedirectError
69
+ (Daniel Lucraft)
70
+
71
+ * Bug fixes
72
+
73
+ * Properly quote single and double quotes strings in XPath
74
+ * Fix warning caused by Nokogiri deprecating CSS::Parser.parse
75
+ (Aaron Patterson)
76
+ * Accept do/end blocks in matchers. [#157] (Peter Jaros)
77
+ * Quote --chdir option to mongrel_rails to support RAILS_ROOTs with spaces
78
+ (T.J. VanSlyke)
79
+
80
+ == 0.4.1 / 2009-01-31
81
+
82
+ * Minor enhancements
83
+
84
+ * Support Sinatra 0.9 (Harry Vangberg)
85
+ * Update query param parsing to work with latest Edge Rails
86
+ * Added #redirected_to method to easily check where an external redirect was
87
+ redirected to (Adam Greene)
88
+ * Recognize input tags with type button (Lena Herrmann)
89
+ * Add uncheck method to Selenium mode (Lee Bankewitz)
90
+
91
+ * Bug fixes
92
+
93
+ * Make requests to a Rails app using a full URL instead of a relative path. This change
94
+ is helpful for Rails apps that use subdomains. (John Hwang and Zach Dennis)
95
+ * Follow redirects that are on the same domain but a different subdomain
96
+ (Adam Greene)
97
+ * rescue from Webrat::TimeoutError in selenium matchers which allows NegativeMatchers
98
+ to behave correctly (Noah Davis)
99
+ * Switch to using selenium.click instead of .check when checking a checkbox
100
+ (Noah Davis)
101
+ * Create tmp/pids directory if directory does not exist. (Amos King and Mike Gaffney)
102
+ * Setup deprecated writers for the selenium_environment= and selenium_port= config
103
+ * Ensure the previous pages params aren't passed through redirect (Daniel Lucraft and
104
+ Bryan Helmkamp)
105
+ * Labels should only search for fields within the current scope (Kyle Hargraves)
106
+
107
+ == 0.4.0 / 2009-01-18
108
+
109
+ * _IMPORTANT_ Breaking change:
110
+
111
+ * Removed init.rb auto-require of webrat/rails
112
+ * Removed auto-require of webrat/rails when requiring webrat when RAILS_ENV is
113
+ defined
114
+
115
+ In your env.rb or test_helper.rb file, ensure you have something like:
116
+
117
+ require "webrat"
118
+
119
+ Webrat.configure do |config|
120
+ config.mode = :rails
121
+ end
122
+
123
+ * Major enhancements
124
+
125
+ * Major improvements to Webrat::Selenium (Many contributors listed here)
126
+ * Add assert_* methods for using Webrat's matchers w/o RSpec (Mike Gaffney, Amos King)
127
+ * Added Webrat.configure method for Webrat configuration [#33] (Mike Gaffney)
128
+ * Added select_time, select_date, and select_datetime to API. [#36] (Ben Mabey)
129
+ * Use Hpricot and REXML when not parsing with Nokogiri (on JRuby, for example)
130
+
131
+ * Minor enhancements
132
+
133
+ * Added Selenium grid configuration and support. (Amos King && Cornel Borcean)
134
+ * Support passing an ActiveRecord model to #within when in Rails mode [#68] (Luke Melia)
135
+ * Make assert_* matchers in rails mode increment the assertions count [#123] (Amos King)
136
+ * Added assert_* matchers to selenium matchers [#110] (Amos King)
137
+ * Added assert_contain, assert_not_contain [#86] (Mike Gaffney, Amos King)
138
+ * Add configuration options for the Selenium environment and port (Kieran Pilkington)
139
+ * Maximize the browser window after initializing Selenium (Luke Melia)
140
+ * Better inspect output for Webrat elements
141
+ * Sets the Webrat mode with Configuration#mode= in the config block [#85] (Mike Gaffney)
142
+ * Detect if the document is XML or HTML using the Content-Type when in Rails mode
143
+ * Expose #selenium method for direct access to Selenium client
144
+ * Check nokogiri gem version before requiring nokogiri
145
+ * Include the Selenium server jar file in the gem (Bryan Helmkamp, Ben Schwarz)
146
+ * Added key_down, key_up and fire_event to Selenium session (Fernando Garcia)
147
+ * Fix outputing README during Rails plugin install (Fernando Garcia)
148
+ * Strip newlines when matching label text (Miha Filej)
149
+ * Add simple support for accessing Webrat's matchers from RSpec by requiring
150
+ "webrat/rspec-rails" (David Chelimsky)
151
+ * Support save_and_open_page in Windows and Cygwin (Mike Gaffney)
152
+ * Added RadioField#checked? to indicated whether or not a radio button is checked
153
+ (Luke Melia)
154
+ * Add spec:jruby rake task for running Webrat's spec suite with JRuby
155
+ * Added field_by_xpath to locate a Webrat::Field using arbitrary XPath expressions
156
+ * Helpful error message for missing option values [#40] (Ben Mabey)
157
+ * Add set_hidden_field method (Noah Davis, Bryan Helmkamp)
158
+ * Add submit_form method for submitting a form by ID (Noah Davis, Bryan Helmkamp)
159
+ * Switch to using Nokogiri.parse for simple XML/XHTML autodetection [#66]
160
+ * Removed Webrat.root method, which seemed to be unused
161
+ * Added automatic starting and stopping of the Selenium server and a Mongrel Rails
162
+ app server when using webrat/selenium
163
+ * Switch to using selenium-client gem and vendor selenium-server.jar (Luke Melia)
164
+ * Added gemspec so the gem builds on GitHub now
165
+ * Deprecate old style methods (fills_in is deprecated in favor of fill_in, etc.)
166
+ * Improvements to the README and RDoc (Bryan Helmkamp, Mike Gaffney)
167
+ * Allow clicking links by id and id regexp (Mike Gaffney)
168
+ * Raise Webrat::DisabledFieldError when attempting to manipulate a disabled field
169
+ * Raise Webrat::NotFoundErrors when an element is not found
170
+ * Raise Webrat::PageLoadError when a failure occurs so that application exceptions
171
+ can be more accurately tested (Ryan Briones)
172
+ * Helpful error message for missing option in select box. [#40] (Ben Mabey)
173
+ * Extracted save_and_open page to make it usable in Selenium mode (Luke Melia)
174
+ * Added save_and_open_screengrab for Selenium mode (Luke Melia)
175
+
176
+ * Bug fixes
177
+
178
+ * field_labeled should disregard labels without matching fields (Kyle Hargraves)
179
+ * Fixed bug where Scope was creating a new DOM rather than re-using the existing DOM.
180
+ [#105] (Zach Dennis)
181
+ * Support Rails > v2.2 by using ActionController::RequestParser for param parsing [#107]
182
+ (Marcello Nuccio)
183
+ * Raise a Webrat::NotFoundError if the scope passed to #within doesn't exist [#90]
184
+ * Match against link _text_ which decodes character references.
185
+ Useful for multibyte languages like Japanese (moronatural@gmail.com)
186
+ * Fix params hash generation for Mechanize when Merb is not defined [#62]
187
+ * Expose some Webrat methods that were missing from the Webrat::Methods module
188
+ (Low Chin Chau)
189
+ * Allow mechanize session to pass through basic auth (Ryan Briones)
190
+ * Improvements to the Mechanize support (Jeremy Burks)
191
+ * Fix following fully qualified local links (Lawrence Pit)
192
+ * Fixed bug where Webrat would lose complex parameters (like foo[bar[baz]][])
193
+ in Merb due to not correctly merging Mashes. (Drew Colthorp)
194
+ * Extend Rails' ActionController::IntegrationTest instead of
195
+ ActionController::Integration::Session (Fixes using Webrat's #select method and
196
+ avoids usage of method_missing)
197
+ * Ensure that Webrat::MechanizeSession.request_page always uses an absolute
198
+ URL. (Graham Ashton)
199
+ * Strip anchor tags from URIs before passing to Rails integration session
200
+ (Noah Davis)
201
+ * Treat text and regexp when matching Selenium buttons (Ross Kaffenberger)
202
+ * Allow SeleniumSession's click_button to be called without an argument without
203
+ blowing up (Luke Melia)
204
+
205
+ == 0.3.4 / 2008-12-29
206
+
207
+ * 1 Minor enhancement
208
+
209
+ * Fix compatibility with Nokogiri 1.1.0 on JRuby
210
+
211
+ * 1 Bug fix
212
+
213
+ * Correct version for Nokogiri dependency in gem
214
+
215
+ == 0.3.3 / 2008-12-28
216
+
217
+ * 1 Minor enhancement
218
+
219
+ * Fix compatibility with Nokogiri 1.1.0 on MRI
220
+
221
+ == 0.3.2 / 2008-11-08
222
+
223
+ * 1 Minor enhancement
224
+
225
+ * Fixes behavior or have_tag when a block is passed. It passes the matched node(s)
226
+ to the block for further specs again. (Carl Lerche)
227
+
228
+ == 0.3.1 / 2008-11-07
229
+
230
+ * 1 Minor enhancement
231
+
232
+ * Use @_webrat_session instance variable instead of @session for Merb integration
233
+ to avoid collisions
234
+
235
+ == 0.3.0 / 2008-11-07
236
+
237
+ * 4 Major enhancements
238
+
239
+ * Added Merb support (Gwyn Morfey, Jeremy Burks, Rob Kaufman, Yehuda Katz)
240
+ * Added experimental Selenium support (Luke Melia)
241
+ * Add have_selector, have_xpath, have_tag and contain matchers from Merb
242
+ * Switch from Hpricot to Nokogiri for XML parsing (thanks, Aaron Patterson)
243
+
244
+ * 37 Minor enhancements
245
+
246
+ * Added #within for manipulating the current page within a selector scope
247
+ * Add support for file fields via #attaches_file method (Rails only at the moment)
248
+ (Kyle Hargraves)
249
+ * Add support for simulating SSL requests (Luke Melia)
250
+ * Added #basic_auth(user, pass) to support HTTP Basic Auth (Aslak Hellesøy)
251
+ * Added support for Sinatra and Rack (Aslak Hellesøy)
252
+ * Rename visits to visit, fills_in to fill_in, etc.
253
+ * Add #field_labeled for looking up form fields by label (David Chelimsky)
254
+ * Add #field_named and #field_with_id locators
255
+ * Don't depend on hoe anymore
256
+ * Return responses after sending requests
257
+ * Allow clicking links and buttons by a regular expression in Selenium (Luke Melia)
258
+ * Allow clicking links by a regular expression
259
+ * Add #http_accept for including MIME type HTTP "Accept" headers (Ryan Briones)
260
+ * Add #header to support inclusion of custom HTTP headers (Ryan Briones)
261
+ * Consider response codes 200-499 as successful enough to not raise a Webrat error
262
+ (David Leal)
263
+ * Add support for clicking areas of an image map (Alex Lang)
264
+ * Support relative links, including href="?foo=bar" (Kyle Hargraves)
265
+ * Separated Rails-specific code from the Webrat core to make it easier to use
266
+ Webrat with other environments
267
+ * Alias visits as visit, clicks_link as click_link, etc. for better readability
268
+ * Raise error when trying to interact with a disabled form element (Luke Melia)
269
+ * Don't send disabled form elements to the server (Nicholas A. Evans)
270
+ * Display response body when the page load is not successful (David Leal)
271
+ * CGI escape form field values (Miha Filej)
272
+ * Add support for redirect_to :back by sending HTTP_REFERER headers
273
+ (Hendrik Volkmer)
274
+ * Expose current DOM (as an Hpricot object) as #current_dom
275
+ * Add support for disabling JavaScript when clicking a link to enable testing of
276
+ both JS and non-JS implementations (Luke Melia and Bryan Helmkamp)
277
+ * Support &nbsp's as spaces in matching link text (Luke Melia)
278
+ * Support button elements (Nick Sieger)
279
+ * Support matching select options by regexp (Kyle Hargraves)
280
+ * save_and_open_page rewrites css and image references to provide a friendlier
281
+ debugging experience (Luke Melia)
282
+ * Added support for matching alt attributes in fields (primarly for clicks_button)
283
+ (Aaron Quint)
284
+ * Support '&' in submitted values (Kyle Hargraves)
285
+ * Support clicking links by title (Dan Barry)
286
+ * Added missing spec for clicking image buttons (Tim Harper)
287
+ * Switched tests to specs, and from Mocha to RSpec's mocking library
288
+ * Add support to click_button for IDs (Gwyn Morfey)
289
+ * Miscellaneous core refactorings (Jan Suchal)
290
+
291
+ * 8 Bug fixes
292
+
293
+ * Fix initialization of WWW::Mechanize (Derek Kastner)
294
+ * Don't open blank pages in the browser (Kyle Hargraves)
295
+ * Support radio buttons with multiple labels (Dan Barry)
296
+ * Fix load order bug on some platforms (Ismael Celis)
297
+ * Fix bug with empty select list option (Kyle Hargraves)
298
+ * Fix regression of not sending default values in password fields
299
+ * Don't explode if encountering inputs with no type attribute (assume text)
300
+ * Fix bug where choosing a radio button in a series with a default submitted the
301
+ incorrect field value (Luke Melia)
302
+
303
+ == 0.2.0 / 2008-04-04
304
+
305
+ * 4 Major enhancements
306
+
307
+ * Add save_and_open_page to aid in debugging
308
+ * Add radio button support via #chooses method
309
+ * Add basic support for Rails-generated JavaScript link tags
310
+ * Add support for checkboxes (Patches from Kyle Hargraves and Jarkko Laine)
311
+ * Add support for textarea fields (Sacha Schlegel)
312
+
313
+ * 8 Minor enhancements
314
+
315
+ * Added reloads method to reload the page (Kamal Fariz Mahyuddi)
316
+ * Prevent making a request if clicking on local anchor link (Kamal Fariz Mahyuddi)
317
+ * Added clicks_link_within(selector, link_text), allowing restricting link search
318
+ to within a given css selector (Luke Melia)
319
+ * Allow specifying the input name/label when doing a select (David Chelimsky)
320
+ * Raise a specific exception if the developer tries to manipulate form elements
321
+ before loading a page (James Deville)
322
+ * Add support for alternate POST, PUT and DELETE link clicking (Kyle Hargraves)
323
+ * Change clicks_link to find the shortest matching link (Luke Melia)
324
+ * Improve matching for labels in potentially ambiguous cases
325
+
326
+ * 7 Bug fixes
327
+
328
+ * Fix incorrect serializing of collection inputs, i.e. name contains []
329
+ (Kamal Fariz Mahyuddi)
330
+ * Serialize empty text field values just like browsers (Kamal Fariz Mahyuddi)
331
+ * Quick fix to avoid @dom not initialized warnings (Kamal Fariz Mahyuddi)
332
+ * Docfix: bad reference to #select method in README (Luke Melia)
333
+ * Ensure Rails-style checkboxes work properly (checkboxes followed by a hidden
334
+ input with the same name)
335
+ * Fix Edge Rails (a.k.a. 2.0 RC) compatibility (David Chelimsky)
336
+ * Support param hashes nested more than one level (David Chelimsky)
337
+
338
+ == 0.1.0 / 2007-11-28
339
+
340
+ * 1 major enhancement
341
+
342
+ * Birthday!
343
+
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2007 Bryan Helmkamp, Seth Fitzsimmons
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
@@ -0,0 +1,85 @@
1
+ = Webrat - Ruby Acceptance Testing for Web applications
2
+
3
+ - http://gitrdoc.com/brynary/webrat
4
+ - http://groups.google.com/group/webrat
5
+ - http://webrat.lighthouseapp.com/
6
+ - http://github.com/brynary/webrat
7
+ - #webrat on Freenode
8
+
9
+ == Description
10
+
11
+ Webrat lets you quickly write expressive and robust acceptance tests for a Ruby
12
+ web application.
13
+
14
+ == Features
15
+
16
+ * Browser Simulator for expressive, high level acceptance testing without the
17
+ performance hit and browser dependency of Selenium or Watir (See Webrat::Session)
18
+ * Use the same API for Browser Simulator and real Selenium tests using
19
+ Webrat::Selenium when necessary (eg. for testing AJAX interactions)
20
+ * Supports multiple Ruby web frameworks: Rails, Merb and Sinatra
21
+ * Supports popular test frameworks: RSpec, Cucumber, Test::Unit and Shoulda
22
+ * Webrat::Matchers API for verifying rendered HTML using CSS, XPath, etc.
23
+
24
+ == Example
25
+
26
+ class SignupTest < ActionController::IntegrationTest
27
+
28
+ def test_trial_account_sign_up
29
+ visit home_path
30
+ click_link "Sign up"
31
+ fill_in "Email", :with => "good@example.com"
32
+ select "Free account"
33
+ click_button "Register"
34
+ end
35
+
36
+ end
37
+
38
+ Behind the scenes, Webrat will ensure:
39
+
40
+ * If a link, form field or button is missing, the test will fail.
41
+ * If a URL is invalid, the test will fail.
42
+ * If a page load or form submission is unsuccessful, the test will fail.
43
+
44
+ == Installing Nokogiri
45
+
46
+ Users of Debian Linux (e.g. Ubuntu) need to run:
47
+
48
+ sudo apt-get install libxslt1-dev libxml2-dev.
49
+
50
+ Otherwise the Nokogiri gem, which Webrat depends on, won't install properly.
51
+
52
+ == Install for Rails
53
+
54
+ To install the latest release as a gem:
55
+
56
+ sudo gem install webrat
57
+
58
+ To install the latest code as a plugin: (_Note:_ This may be less stable than using a released version)
59
+
60
+ script/plugin install git://github.com/brynary/webrat.git
61
+
62
+ In your test_helper.rb or env.rb (for Cucumber) add:
63
+
64
+ require "webrat"
65
+
66
+ Webrat.configure do |config|
67
+ config.mode = :rails
68
+ end
69
+
70
+ == Install with Merb
71
+
72
+ Merb 1.0 has built-in, seamless Webrat support. Just start using
73
+ methods from Webrat::Session in your specs.
74
+
75
+ == Authors
76
+
77
+ - Maintained by {Bryan Helmkamp}[mailto:bryan@brynary.com]
78
+ - Original code written by {Seth Fitzsimmons}[mailto:seth@mojodna.net]
79
+ - Initial development was sponsored by EastMedia[http://www.eastmedia.com]
80
+ - Many other contributors. See attributions in History.txt
81
+
82
+ == License
83
+
84
+ Copyright (c) 2007-2008 Bryan Helmkamp, Seth Fitzsimmons.
85
+ See MIT-LICENSE.txt in this directory.
@@ -0,0 +1,164 @@
1
+ # require 'rubygems'
2
+ require "rake/gempackagetask"
3
+ require 'rake/rdoctask'
4
+ require "rake/clean"
5
+ require 'spec'
6
+ require 'spec/rake/spectask'
7
+ require 'spec/rake/verify_rcov'
8
+ require File.expand_path('./lib/webrat.rb')
9
+
10
+ ##############################################################################
11
+ # Package && release
12
+ ##############################################################################
13
+ spec = Gem::Specification.new do |s|
14
+ s.name = "webrat"
15
+ s.version = Webrat::VERSION
16
+ s.platform = Gem::Platform::RUBY
17
+ s.author = "Bryan Helmkamp"
18
+ s.email = "bryan" + "@" + "brynary.com"
19
+ s.homepage = "http://github.com/brynary/webrat"
20
+ s.summary = "Webrat. Ruby Acceptance Testing for Web applications"
21
+ s.bindir = "bin"
22
+ s.description = s.summary
23
+ s.require_path = "lib"
24
+ s.files = %w(History.txt install.rb MIT-LICENSE.txt README.rdoc Rakefile) + Dir["lib/**/*"] + Dir["vendor/**/*"]
25
+
26
+ # rdoc
27
+ s.has_rdoc = true
28
+ s.extra_rdoc_files = %w(README.rdoc MIT-LICENSE.txt)
29
+
30
+ # Dependencies
31
+ s.add_dependency "nokogiri", ">= 1.2.0"
32
+
33
+ s.rubyforge_project = "webrat"
34
+ end
35
+
36
+ Rake::GemPackageTask.new(spec) do |package|
37
+ package.gem_spec = spec
38
+ end
39
+
40
+ desc 'Show information about the gem.'
41
+ task :debug_gem do
42
+ puts spec.to_ruby
43
+ end
44
+
45
+ CLEAN.include ["pkg", "*.gem", "doc", "ri", "coverage"]
46
+
47
+ desc "Upload rdoc to brynary.com"
48
+ task :publish_rdoc => :docs do
49
+ sh "scp -r doc/ brynary.com:/apps/uploads/webrat"
50
+ end
51
+
52
+ desc "Run API and Core specs"
53
+ Spec::Rake::SpecTask.new do |t|
54
+ t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
55
+ t.spec_files = FileList['spec/public/**/*_spec.rb'] + FileList['spec/private/**/*_spec.rb']
56
+ end
57
+
58
+ desc "Run all specs in spec directory with RCov"
59
+ Spec::Rake::SpecTask.new(:rcov) do |t|
60
+ t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
61
+ t.spec_files = FileList['spec/public/**/*_spec.rb'] + FileList['spec/private/**/*_spec.rb']
62
+ t.rcov = true
63
+ t.rcov_opts = lambda do
64
+ IO.readlines(File.dirname(__FILE__) + "/spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
65
+ end
66
+ end
67
+
68
+ RCov::VerifyTask.new(:verify_rcov => :rcov) do |t|
69
+ t.threshold = 96.2 # Make sure you have rcov 0.7 or higher!
70
+ end
71
+
72
+ desc 'Install the package as a gem.'
73
+ task :install_gem => [:clean, :package] do
74
+ gem_filename = Dir['pkg/*.gem'].first
75
+ sh "sudo gem install --no-rdoc --no-ri --local #{gem_filename}"
76
+ end
77
+
78
+ desc "Delete generated RDoc"
79
+ task :clobber_docs do
80
+ FileUtils.rm_rf("doc")
81
+ end
82
+
83
+ desc "Generate RDoc"
84
+ task :docs => :clobber_docs do
85
+ system "hanna --title 'Webrat #{Webrat::VERSION} API Documentation'"
86
+ end
87
+
88
+ desc "Run specs using jruby"
89
+ task "spec:jruby" do
90
+ result = system "jruby -S rake spec"
91
+ raise "JRuby tests failed" unless result
92
+ end
93
+
94
+ desc "Run each spec in isolation to test for dependency issues"
95
+ task :spec_deps do
96
+ Dir["spec/**/*_spec.rb"].each do |test|
97
+ if !system("spec #{test} &> /dev/null")
98
+ puts "Dependency Issues: #{test}"
99
+ end
100
+ end
101
+ end
102
+
103
+ task :prepare do
104
+ system "ln -s ../../../../.. ./spec/integration/rails/vendor/plugins/webrat"
105
+ end
106
+
107
+ namespace :spec do
108
+ desc "Run the integration specs"
109
+ task :integration => ["integration:rails", "integration:merb", "integration:sinatra", "integration:rack"]
110
+
111
+ namespace :integration do
112
+ desc "Run the Rails integration specs"
113
+ task :rails => ['rails:webrat'] #,'rails:selenium'] currently not running selenium as it doesn't pass.
114
+
115
+ namespace :rails do
116
+ task :selenium do
117
+ Dir.chdir "spec/integration/rails" do
118
+ result = system "rake test_unit:selenium"
119
+ raise "Rails integration tests failed" unless result
120
+ end
121
+ end
122
+
123
+ task :webrat do
124
+ Dir.chdir "spec/integration/rails" do
125
+ result = system "rake test_unit:rails"
126
+ raise "Rails integration tests failed" unless result
127
+ end
128
+ end
129
+ end
130
+
131
+ desc "Run the Merb integration specs"
132
+ task :merb do
133
+ Dir.chdir "spec/integration/merb" do
134
+ result = system "rake spec"
135
+ raise "Merb integration tests failed" unless result
136
+ end
137
+ end
138
+
139
+ desc "Run the Sinatra integration specs"
140
+ task :sinatra do
141
+ Dir.chdir "spec/integration/sinatra" do
142
+ result = system "rake test"
143
+ raise "Sinatra integration tests failed" unless result
144
+ end
145
+ end
146
+
147
+ desc "Run the Sinatra integration specs"
148
+ task :rack do
149
+ Dir.chdir "spec/integration/rack" do
150
+ result = system "rake test"
151
+ raise "Rack integration tests failed" unless result
152
+ end
153
+ end
154
+ end
155
+ end
156
+
157
+ task :default => :spec
158
+
159
+ task :precommit => ["spec", "spec:jruby", "spec:integration"]
160
+
161
+ desc 'Removes trailing whitespace'
162
+ task :whitespace do
163
+ sh %{find . -name '*.rb' -exec sed -i '' 's/ *$//g' {} \\;}
164
+ end
@@ -0,0 +1 @@
1
+ puts IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
metadata ADDED
@@ -0,0 +1,67 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sr-webrat
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.4.0
5
+ platform: ruby
6
+ authors:
7
+ - Bryan Helmkamp
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-05-16 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: nokogiri
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.2.0
24
+ version:
25
+ description: Webrat. Ruby Acceptance Testing for Web applications
26
+ email: bryan@brynary.com
27
+ executables: []
28
+
29
+ extensions: []
30
+
31
+ extra_rdoc_files:
32
+ - README.rdoc
33
+ - MIT-LICENSE.txt
34
+ files:
35
+ - History.txt
36
+ - install.rb
37
+ - MIT-LICENSE.txt
38
+ - README.rdoc
39
+ - Rakefile
40
+ has_rdoc: true
41
+ homepage: http://github.com/brynary/webrat
42
+ post_install_message:
43
+ rdoc_options: []
44
+
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: "0"
52
+ version:
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: "0"
58
+ version:
59
+ requirements: []
60
+
61
+ rubyforge_project: webrat
62
+ rubygems_version: 1.2.0
63
+ signing_key:
64
+ specification_version: 2
65
+ summary: Webrat. Ruby Acceptance Testing for Web applications
66
+ test_files: []
67
+