Class: Object

Inherits:
BasicObject
Includes:
Assay::AE::Assert, Assay::AE::Expect, Assay::AE::Must, Assay::AE::Should, Assay::Bang::Methods, Assay::Extensions
Defined in:
lib/assay/ae.rb,
lib/assay/bang.rb,
lib/assay/ae/must.rb,
lib/assay/minitest.rb,
lib/assay/ae/should.rb,
lib/assay/ae/core_ext.rb,
lib/assay/fluidity/is.rb,
lib/assay/fluidity/must.rb,
lib/assay/fluidity/will.rb,
lib/assay/fluidity/assert.rb,
lib/assay/fluidity/should.rb

Overview

BasicObject

Instance Method Summary collapse

Methods included from Assay::AE::Should

#should!, #should=

Methods included from Assay::MiniTest::Extensions

#must_be, #must_be_empty, #must_be_equivalent_to, #must_be_false, #must_be_instance_of, #must_be_kind_of, #must_be_like, #must_be_nil, #must_be_same_as, #must_be_true, #must_be_within_delta, #must_be_within_epsilon, #must_equal, #must_include, #must_match, #must_output, #must_raise, #must_respond_to, #must_satisfy, #must_send, #must_throw, #wont_be, #wont_be_empty, #wont_be_equivalent_to, #wont_be_false, #wont_be_instance_of, #wont_be_kind_of, #wont_be_like, #wont_be_nil, #wont_be_same_as, #wont_be_true, #wont_be_within_delta, #wont_be_within_epsilon, #wont_equal, #wont_include, #wont_match, #wont_raise, #wont_respond_to, #wont_satisfy, #wont_send, #wont_throw

Methods included from Assay::AE::Must

#must!, #must=

Methods included from Assay::Bang::Methods

#method_missing, #respond_to_missing?

Methods included from Assay::AE::Expect

#expect, #expect!, #expected

Methods included from Assay::AE::Assert

#assert=, #flunk, #refute, #refute=

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Assay::Bang::Methods

Instance Method Details

#assert(*args, &blk) ⇒ Object

Use assert nomenclature for assertions.

10.assert.kind_of?(Integer)



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/assay/fluidity/assert.rb', line 9

def assert(*args, &blk)
  return ::Assay::Fluidity::Grammar::Assert.new(self) if args.empty?

  matcher = args.first

  if ::Assay::Assertor === matcher
    matcher =~ self
  else
    super(*args, &blk)
  end
end

#eql?(value = NA) ⇒ Boolean

Allows eql? to take a block.

Returns:

  • (Boolean)


48
49
50
# File 'lib/assay/ae/core_ext.rb', line 48

def eql?(value=NA) #:yield:
  block_given? ? super(yield) : super
end

#equal?(value = NA) ⇒ Boolean

Allows equal? to take a block.

Returns:

  • (Boolean)


43
44
45
# File 'lib/assay/ae/core_ext.rb', line 43

def equal?(value=NA) #:yield:
  block_given? ? super(yield) : super
end

#is(matcher = nil) ⇒ Object

Use is nomenclature for assertions.

10.is.kind_of?(Integer)



9
10
11
12
13
14
15
# File 'lib/assay/fluidity/is.rb', line 9

def is(matcher=nil)
  if matcher
    matcher === self
  else
    ::Assay::Fluidity::Grammar::Is.new(self)
  end
end

#must(matcher = nil) ⇒ Object

Use must nomenclature for assertions.

10.must.be.kind_of(Integer)



11
12
13
14
15
16
17
# File 'lib/assay/fluidity/must.rb', line 11

def must(matcher=nil)
  if matcher
    matcher =~ self
  else
    ::Assay::Fluidity::Grammar::Must.new(self)
  end
end

#must_not(matcher = nil) ⇒ Object Also known as: mustnt

Also, must_not nomenclature for assertions.

10.must_not.be.kind_of?(Integer)



23
24
25
26
27
28
29
# File 'lib/assay/fluidity/must.rb', line 23

def must_not(matcher=nil)
  if matcher
    matcher !~ self
  else
    ::Assay::Fluidity::Grammar::Must.new(self, true)
  end
end

#should(matcher = nil) ⇒ Object

Use should nomenclature for assertions.

10.should.be.kind_of(Integer)



9
10
11
12
13
14
15
# File 'lib/assay/fluidity/should.rb', line 9

def should(matcher=nil)
  if matcher
    matcher =~ self
  else
    ::Assay::Fluidity::Grammar::Should.new(self)
  end
end

#should_not(matcher = nil) ⇒ Object Also known as: shouldnt

Also, should_not nomenclature for assertions.

10.should_not.be.kind_of?(Integer)



21
22
23
24
25
26
27
# File 'lib/assay/fluidity/should.rb', line 21

def should_not(matcher=nil)
  if matcher
    matcher !~ self
  else
    ::Assay::Fluidity::Grammar::Should.new(self, true)
  end
end

#will(matcher = nil) ⇒ Object

Use will nomenclature for assertions.

10.will.be.kind_of(Integer)



9
10
11
12
13
14
15
# File 'lib/assay/fluidity/will.rb', line 9

def will(matcher=nil)
  if matcher
    matcher =~ self
  else
    ::Assay::Fluidity::Grammar::Will.new(self)
  end
end

#will_not(matcher = nil) ⇒ Object Also known as: wont

Also, will_not nomenclature for assertions.

10.will_not.be.kind_of?(Integer)



21
22
23
24
25
26
27
# File 'lib/assay/fluidity/will.rb', line 21

def will_not(matcher=nil)
  if matcher
    matcher !~ self
  else
    ::Assay::Fluidity::Grammar::Will.new(self, true)
  end
end