Module: Merb::Test::Rspec::ControllerMatchers

Defined in:
merb-core/lib/merb-core/test/matchers/controller_matchers.rb

Defined Under Namespace

Classes: BeError, BeRedirect, Provide

Instance Method Summary collapse

Instance Method Details

#be_error(expected) ⇒ Object



50
51
52
# File 'merb-core/lib/merb-core/test/matchers/controller_matchers.rb', line 50

def be_error(expected)
  BeError.new(expected)
end

#provide(expected) ⇒ Object

Passes if the controller actually provides the target format

Examples:

ControllerClass.should provide( :html )
controller_instance.should provide( :xml )

Parameters:

  • expected (Symbol)

    A format to check



92
93
94
# File 'merb-core/lib/merb-core/test/matchers/controller_matchers.rb', line 92

def provide( expected )
  Provide.new( expected )
end