Class Spec::Expectations::Should::ItemHandler
In: lib/spec/expectations/should/have.rb
Parent: Object

Methods

Public Class methods

[Source]

     # File lib/spec/expectations/should/have.rb, line 102
102:         def initialize(target)
103:           @target = target
104:         end

Public Instance methods

[Source]

     # File lib/spec/expectations/should/have.rb, line 106
106:         def build_message(sym, args)
107:           "#{@target.inspect} #{item_expectation} #{sym}: #{args.collect{|arg| arg.inspect}.join(', ')}"
108:         end

[Source]

     # File lib/spec/expectations/should/have.rb, line 110
110:         def fail_with(message)
111:           Spec::Expectations.fail_with(message)
112:         end

[Source]

     # File lib/spec/expectations/should/have.rb, line 98
 98:         def wants_to_handle(sym)
 99:           @target.respond_to?("has_#{sym}?")
100:         end

[Validate]