Module: Assert

Defined in:
lib/assert.rb,
lib/assert/cli.rb,
lib/assert/stub.rb,
lib/assert/test.rb,
lib/assert/view.rb,
lib/assert/macro.rb,
lib/assert/suite.rb,
lib/assert/utils.rb,
lib/assert/config.rb,
lib/assert/result.rb,
lib/assert/runner.rb,
lib/assert/context.rb,
lib/assert/factory.rb,
lib/assert/version.rb,
lib/assert/file_line.rb,
lib/assert/assertions.rb,
lib/assert/actual_value.rb,
lib/assert/context_info.rb,
lib/assert/default_view.rb,
lib/assert/view_helpers.rb,
lib/assert/assert_runner.rb,
lib/assert/default_suite.rb,
lib/assert/config_helpers.rb,
lib/assert/default_runner.rb,
lib/assert/context/let_dsl.rb,
lib/assert/context/test_dsl.rb,
lib/assert/context/setup_dsl.rb,
lib/assert/context/suite_dsl.rb,
lib/assert/context/subject_dsl.rb,
lib/assert/context/method_missing.rb

Defined Under Namespace

Modules: Assertions, ConfigHelpers, Factory, Macros, Result, RoundedMillisecondTime, Utils, ViewHelpers Classes: ActualValue, AssertRunner, CLI, CLIRB, Config, Context, ContextInfo, DefaultRunner, DefaultSuite, DefaultView, FileLine, Macro, Runner, Suite, Test, View

Constant Summary collapse

U =

alias for brevity

Utils
VERSION =
"2.19.0"

Class Method Summary collapse

Class Method Details

.configObject



12
# File 'lib/assert.rb', line 12

def self.config; @config ||= Config.new; end

.configure {|self.config| ... } ⇒ Object

Yields:



13
# File 'lib/assert.rb', line 13

def self.configure; yield self.config if block_given?; end

.runnerObject



17
# File 'lib/assert.rb', line 17

def self.runner; self.config.runner; end

.stub(*args, &block) ⇒ Object



8
9
10
# File 'lib/assert/stub.rb', line 8

def self.stub(*args, &block)
  MuchStub.stub(*args, &block)
end

.stub_on_call(*args, &block) ⇒ Object



12
13
14
# File 'lib/assert/stub.rb', line 12

def self.stub_on_call(*args, &block)
  MuchStub.stub_on_call(*args, &block)
end

.stub_send(*args, &block) ⇒ Object



24
25
26
27
28
29
30
31
32
# File 'lib/assert/stub.rb', line 24

def self.stub_send(*args, &block)
  orig_caller = caller_locations
  begin
    MuchStub.stub_send(*args, &block)
  rescue MuchStub::NotStubbedError => err
    err.set_backtrace(orig_caller.map(&:to_s))
    raise err
  end
end

.stub_spy(*args, &block) ⇒ Object



42
43
44
# File 'lib/assert/stub.rb', line 42

def self.stub_spy(*args, &block)
  MuchStub.spy(*args, &block)
end

.stub_tap(*args, &block) ⇒ Object



34
35
36
# File 'lib/assert/stub.rb', line 34

def self.stub_tap(*args, &block)
  MuchStub.tap(*args, &block)
end

.stub_tap_on_call(*args, &block) ⇒ Object



38
39
40
# File 'lib/assert/stub.rb', line 38

def self.stub_tap_on_call(*args, &block)
  MuchStub.tap_on_call(*args, &block)
end

.stubsObject



4
5
6
# File 'lib/assert/stub.rb', line 4

def self.stubs
  MuchStub.stubs
end

.suiteObject



16
# File 'lib/assert.rb', line 16

def self.suite;  self.config.suite;  end

.unstub(*args) ⇒ Object



16
17
18
# File 'lib/assert/stub.rb', line 16

def self.unstub(*args)
  MuchStub.unstub(*args)
end

.unstub!Object



20
21
22
# File 'lib/assert/stub.rb', line 20

def self.unstub!
  MuchStub.unstub!
end

.viewObject



15
# File 'lib/assert.rb', line 15

def self.view;   self.config.view;   end