Skip to content

Commit

Permalink
Add test auto-runner
Browse files Browse the repository at this point in the history
  • Loading branch information
crackofdusk committed Aug 18, 2016
1 parent 6fa98df commit 2a53359
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 14 additions & 0 deletions autorun.rb
@@ -0,0 +1,14 @@
require_relative './raisin'

module Raisin
@@at_exit_registered ||= false

def self.autorun
unless @@at_exit_registered
at_exit { TestSuite.run }
@@at_exit_registered = true
end
end
end

Raisin.autorun
4 changes: 1 addition & 3 deletions test.rb
@@ -1,4 +1,4 @@
require_relative './raisin'
require_relative './autorun'

class NothingRaised < StandardError
end
Expand Down Expand Up @@ -89,5 +89,3 @@ def define_suite(&block)
TestSuite.unregister(suite)
suite
end

TestSuite.run

0 comments on commit 2a53359

Please sign in to comment.