Module: EEtee

Defined in:
lib/eetee.rb,
lib/eetee/test.rb,
lib/eetee/errors.rb,
lib/eetee/runner.rb,
lib/eetee/shared.rb,
lib/eetee/context.rb,
lib/eetee/version.rb,
lib/eetee/reporter.rb,
lib/eetee/reporters/text.rb,
lib/eetee/assertion_wrapper.rb,
lib/eetee/reporters/console.rb

Defined Under Namespace

Modules: AssertionHelpers, Assertions, EMSpec, Reporters, SharedContextMethods, TestBaseExtension Classes: AssertionFailed, AssertionWrapper, Context, Error, Reporter, Runner, Shared, Test

Constant Summary collapse

NOT_CLONEABLE_TYPES =
[Fixnum, NilClass, TrueClass, FalseClass].freeze
VERSION =
"0.0.10"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.current_reporterObject



36
37
38
# File 'lib/eetee.rb', line 36

def current_reporter
  Thread.current[:eetee_reporter]
end

.current_reporter=(reporter) ⇒ Object



40
41
42
# File 'lib/eetee.rb', line 40

def current_reporter=(reporter)
  Thread.current[:eetee_reporter] = reporter
end

.current_testObject



46
47
48
# File 'lib/eetee.rb', line 46

def self.current_test
  Thread.current[:eetee_test]
end

.current_test=(test) ⇒ Object



50
51
52
# File 'lib/eetee.rb', line 50

def self.current_test=(test)
  Thread.current[:eetee_test] = test
end

.default_reporter_classObject



22
23
24
# File 'lib/eetee.rb', line 22

def default_reporter_class
  @reporter
end

.default_reporter_class=(reporter) ⇒ Object



18
19
20
# File 'lib/eetee.rb', line 18

def default_reporter_class=(reporter)
  @reporter = reporter
end

.enable_focus_modeObject



30
31
32
# File 'lib/eetee.rb', line 30

def enable_focus_mode
  @enable_focus_mode
end

.enable_focus_mode=(value) ⇒ Object



26
27
28
# File 'lib/eetee.rb', line 26

def enable_focus_mode=(value)
  @enable_focus_mode = value
end

Instance Method Details

#describe(description, enable_focus_mode = EEtee.enable_focus_mode, &block) ⇒ Object



61
62
63
64
65
# File 'lib/eetee.rb', line 61

def describe(description, enable_focus_mode = EEtee.enable_focus_mode, &block)
  reporter = EEtee.default_reporter_class.new
  Context.new(description, 0, reporter, {}, enable_focus_mode, &block)
  reporter.report_results()
end

#report_resultsObject



63
64
65
# File 'lib/eetee/reporter.rb', line 63

def report_results
  # no op
end

#shared(name, &block) ⇒ Object



67
68
69
# File 'lib/eetee.rb', line 67

def shared(name, &block)
  Shared.new(name, &block)
end