Module: Mustard

Defined in:
lib/mustard.rb,
lib/mustard/must.rb,
lib/mustard/failure.rb,
lib/mustard/version.rb,
lib/mustard/object_extension.rb,
lib/mustard/matchers/be_matcher.rb,
lib/mustard/matchers/close_matcher.rb,
lib/mustard/matchers/default_matcher.rb

Defined Under Namespace

Modules: ObjectExtension Classes: BeMatcher, CloseMatcher, DefaultMatcher, Failure, Must

Constant Summary collapse

VERSION =
"0.1.0"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.fail(message = nil) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/mustard.rb', line 14

def self.fail(message = nil)
  if defined?(RSpec::Mustard::Failure)
    raise RSpec::Mustard::Failure.new(message)
  else
    raise Failure.new(message)
  end
end

.matcher(*args, &block) ⇒ Object



10
11
12
# File 'lib/mustard.rb', line 10

def self.matcher(*args, &block)
  Must.matcher(*args, &block)
end

Instance Method Details

#fail(*args) ⇒ Object



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

def fail(*args)
  Mustard.fail(*args)
end