# File lib/rspec/matchers/built_in/be.rb, line 152 152: def description 153: "#{prefix_to_sentence}#{expected_to_sentence}#{args_to_sentence}" 154: end
# File lib/rspec/matchers/built_in/be.rb, line 144 144: def failure_message_for_should 145: "expected #{predicate}#{args_to_s} to return true, got #{@result.inspect}" 146: end
# File lib/rspec/matchers/built_in/be.rb, line 148 148: def failure_message_for_should_not 149: "expected #{predicate}#{args_to_s} to return false, got #{@result.inspect}" 150: end
# File lib/rspec/matchers/built_in/be.rb, line 129 129: def matches?(actual) 130: @actual = actual 131: begin 132: return @result = actual.__send__(predicate, *@args, &@block) 133: rescue NameError => predicate_missing_error 134: "this needs to be here or rcov will not count this branch even though it's executed in a code example" 135: end 136: 137: begin 138: return @result = actual.__send__(present_tense_predicate, *@args, &@block) 139: rescue NameError 140: raise predicate_missing_error 141: end 142: end
# File lib/rspec/matchers/built_in/be.rb, line 166 166: def parse_expected(expected) 167: @prefix, expected = prefix_and_expected(expected) 168: expected 169: end
# File lib/rspec/matchers/built_in/be.rb, line 158 158: def predicate 159: "#{@expected}?".to_sym 160: end
# File lib/rspec/matchers/built_in/be.rb, line 171 171: def prefix_and_expected(symbol) 172: symbol.to_s =~ /^(be_(an?_)?)(.*)/ 173: return $1, $3 174: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.