Skip to content

Commit

Permalink
Added new version on fuzzyfinder_textmate, added support to run spec …
Browse files Browse the repository at this point in the history
…files and show results in Firefox, added support to browse Ruby documentation from apidock.com/Ruby, added some new snippets, added plugin tComment
  • Loading branch information
cassiomarques committed Jan 9, 2009
1 parent 5cc9fea commit 85a3c87
Show file tree
Hide file tree
Showing 11 changed files with 896 additions and 256 deletions.
44 changes: 44 additions & 0 deletions bin/run_rspec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
spec_dir=File.dirname(ARGV[0])
rails_project_dir="#{spec_dir}/../.."

report_file="#{rails_project_dir}/doc/rspec_report.html"

rspec_rails_plugin = File.join(rails_project_dir,'vendor','plugins','rspec','lib')
if File.directory?(rspec_rails_plugin)
$LOAD_PATH.unshift(rspec_rails_plugin)
else
require 'rubygems'
require 'spec'
end
require 'rubygems'
require 'spec'
require 'spec/runner/formatter/html_formatter'

module Spec
module Runner
module Formatter
class HtmlFormatter
def backtrace_line(line)
line.gsub(/([^:]*\.rb):(\d*)/) do
"<a href=\"gedit://#{File.expand_path($1)}?#{$2}\">#{$1}:#{$2}</a> "
end
end
end
end
end
end

if File.exists? report_file
File.delete report_file
end

argv = [ARGV[0]]
argv << "--c"
argv << "--format"
argv << "html:#{report_file}"

::Spec::Runner::CommandLine.run(::Spec::Runner::OptionParser.parse(argv, STDERR, STDOUT))

if File.exists? report_file
`firefox #{report_file}`
end
Loading

0 comments on commit 85a3c87

Please sign in to comment.