Skip to content

Commit

Permalink
Add spec:jruby task for running spec suite with jruby
Browse files Browse the repository at this point in the history
  • Loading branch information
brynary committed Nov 19, 2008
1 parent 10d5d76 commit 22d5b91
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
7 changes: 3 additions & 4 deletions Rakefile
Expand Up @@ -88,8 +88,7 @@ Rake::RDocTask.new(:docs) do |rd|
rd.options << "-t #{title}"
end

desc "Run all specs"
task "spec2" do
require "lib/webrat/test/run_specs"
run_specs(Dir["#{Dir.pwd}/spec//**/*_spec.rb"])
desc "Run specs using jruby"
task "spec:jruby" do
system "jruby -S rake spec"
end
2 changes: 1 addition & 1 deletion lib/webrat/core/link.rb
Expand Up @@ -44,7 +44,7 @@ def inner_html
end

def text
@element.text
@element.inner_text
end

protected
Expand Down
8 changes: 1 addition & 7 deletions lib/webrat/test/run_specs.rb
Expand Up @@ -84,13 +84,7 @@ def report

# Runs specs in all files matching the file pattern.
#
# ==== Parameters
# globs<String, Array[String]>:: File patterns to look for.
# spec_cmd<~to_s>:: The spec command. Defaults to "spec".
# run_opts<String>:: Options to pass to spec commands, for instance,
# if you want to use profiling formatter.
# except<Array[String]>:: File paths to skip.
def run_specs(globs, spec_cmd='spec', run_opts = "-c", except = [])
def run_specs(globs)
require "optparse"
require "spec"
globs = globs.is_a?(Array) ? globs : [globs]
Expand Down

0 comments on commit 22d5b91

Please sign in to comment.