Matchy::Modals

Public Instance Methods

should(expectation = nil) click to toggle source

Tests an expectation against the given object.

Examples

  "hello".should eql("hello")
  13.should equal(13)
  lambda { raise "u r doomed" }.should raise_error
    # File lib/matchy/modals.rb, line 11
11:     def should(expectation = nil)
12:       Matchy::ExpectationBuilder.build_expectation(true, expectation, self)
13:     end
Also aliased as: will
should_not(expectation = nil) click to toggle source

Tests that an expectation doesn’t match the given object.

Examples

  "hello".should_not eql("hi")
  41.should_not equal(13)
  lambda { "savd bai da bell" }.should_not raise_error
    # File lib/matchy/modals.rb, line 25
25:     def should_not(expectation = nil)
26:       Matchy::ExpectationBuilder.build_expectation(false, expectation, self)
27:     end
Also aliased as: will_not, wont
will(expectation = nil) click to toggle source
Alias for: should
will_not(expectation = nil) click to toggle source
Alias for: should_not
wont(expectation = nil) click to toggle source
Alias for: should_not

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.