public
Description: Webrat - Ruby Acceptance Testing for Web applications
Homepage: http://gitrdoc.com/brynary/webrat/tree/master/
Clone URL: git://github.com/brynary/webrat.git
Add spec:jruby task for running spec suite with jruby
brynary (author)
Tue Nov 18 18:09:48 -0800 2008
commit  22d5b91dd4627701a3413ad56c763e4f689aae7e
tree    0f024d1b6d03f25d283afdb6a7d0c2cb50bd8e2b
parent  10d5d7695f2754637912608aa2707d65dae9602b
...
88
89
90
91
92
93
94
 
 
 
95
96
...
88
89
90
 
 
 
 
91
92
93
94
95
0
@@ -88,8 +88,7 @@ Rake::RDocTask.new(:docs) do |rd|
0
   rd.options << "-t #{title}"
0
 end
0
 
0
-desc "Run all specs"
0
-task "spec2" do
0
-  require "lib/webrat/test/run_specs"
0
-  run_specs(Dir["#{Dir.pwd}/spec//**/*_spec.rb"])
0
+desc "Run specs using jruby"
0
+task "spec:jruby" do
0
+  system "jruby -S rake spec"
0
 end
0
\ No newline at end of file
...
44
45
46
47
 
48
49
50
...
44
45
46
 
47
48
49
50
0
@@ -44,7 +44,7 @@ module Webrat
0
     end
0
     
0
     def text
0
-      @element.text
0
+      @element.inner_text
0
     end
0
     
0
   protected
...
84
85
86
87
88
89
90
91
92
93
 
94
95
96
...
84
85
86
 
 
 
 
 
 
 
87
88
89
90
0
@@ -84,13 +84,7 @@ require File.dirname(__FILE__) / "run_spec"
0
 
0
 # Runs specs in all files matching the file pattern.
0
 #
0
-# ==== Parameters
0
-# globs<String, Array[String]>:: File patterns to look for.
0
-# spec_cmd<~to_s>:: The spec command. Defaults to "spec".
0
-# run_opts<String>:: Options to pass to spec commands, for instance,
0
-#                    if you want to use profiling formatter.
0
-# except<Array[String]>:: File paths to skip.
0
-def run_specs(globs, spec_cmd='spec', run_opts = "-c", except = [])
0
+def run_specs(globs)
0
   require "optparse"
0
   require "spec"
0
   globs = globs.is_a?(Array) ? globs : [globs]

Comments