Skip to content

Commit

Permalink
Unload previous examples so that they do not accumulate
Browse files Browse the repository at this point in the history
Fixes #30
  • Loading branch information
nilbus committed May 29, 2013
1 parent 56598bb commit c48a52f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/guard/jruby-rspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def start
end

def run_on_changes(raw_paths)
unload_previous_examples
reload_paths(raw_paths)

unless @custom_watchers.nil? or @custom_watchers.empty?
Expand Down Expand Up @@ -92,6 +93,13 @@ def reload_paths(paths)
end
end
end

private

def unload_previous_examples
::RSpec.configuration.reset
::RSpec.world.reset
end
end
end

0 comments on commit c48a52f

Please sign in to comment.