Module: Doctrine

Defined in:
lib/doctrine.rb,
lib/doctrine/run.rb,
lib/doctrine/error.rb,
lib/doctrine/suite.rb,
lib/doctrine/tenet.rb,
lib/doctrine/runner.rb,
lib/doctrine/worker.rb,
lib/doctrine/context.rb,
lib/doctrine/version.rb,
lib/doctrine/reporter.rb,
lib/doctrine/definition.rb,
lib/doctrine/errors/assertion_failed.rb,
lib/doctrine/errors/undefined_subject.rb

Defined Under Namespace

Classes: AssertionFailed, Context, Definition, Error, Reporter, Run, Runner, Suite, Tenet, UndefinedSubject, Worker

Constant Summary collapse

VERSION =
"0.0.0"

Class Method Summary collapse

Class Method Details

.load(path, pattern: "*_doctrine.rb") ⇒ Object


11
12
13
14
15
16
17
18
19
20
21
# File 'lib/doctrine.rb', line 11

def self.load(path, pattern: "*_doctrine.rb")
  path = Pathname(path).expand_path
  name = path.to_s.split("/").last(2)
  suite = Suite.define(*name)
  context = Context.new(suite: suite)

  suite.makes(:doctrine, Definition, within: name)
  suite.loads(:doctrine, path, strict: false, pattern: pattern, context: context)
  suite.load
  suite
end

.versionObject

public

8
9
10
# File 'lib/doctrine/version.rb', line 8

def self.version
  VERSION
end