Skip to content

Commit

Permalink
Adds rspec support.
Browse files Browse the repository at this point in the history
  • Loading branch information
sharnik committed Nov 7, 2011
1 parent 1b23236 commit 964f5bb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions lib/loris/monkeypatching.rb
Expand Up @@ -46,3 +46,17 @@ def run(*args, &block)
end
end

if defined?(::RSpec::Core::Example)
module ::RSpec::Core
class Example
def run
alias :run_without_analyzer :run
def run
Loris.test_suite_wrapper do
run_without_analyzer
end
end
end
end
end
end
2 changes: 1 addition & 1 deletion lib/tasks/loris.rake
Expand Up @@ -5,7 +5,7 @@ namespace :loris do
desc "Tests the coverage with Loris"
task :run do
options = {
:tests_path => ENV['tests_path'] || 'test',
:tests_path => ENV['tests_path'] || 'spec',
:file => ENV['file'],
:line_number => ENV['line_number'],
:exclude_paths => ENV['exclude_paths'] || ''
Expand Down

0 comments on commit 964f5bb

Please sign in to comment.