module RSpec::Core::Subject::ExampleMethods
def _attribute_chain(attribute)
def _attribute_chain(attribute) attribute.to_s.split('.') end
def _nested_attribute(subject, attribute)
def _nested_attribute(subject, attribute) _attribute_chain(attribute).inject(subject) do |inner_subject, attr| inner_subject.send(attr) end end
def should(matcher=nil, message=nil)
- See: #subject -
def should(matcher=nil, message=nil) RSpec::Expectations::PositiveExpectationHandler.handle_matcher(subject, matcher, message) end
def should_not(matcher=nil, message=nil)
- See: #subject -
def should_not(matcher=nil, message=nil) RSpec::Expectations::NegativeExpectationHandler.handle_matcher(subject, matcher, message) end
def subject
- See: #should -
See: ExampleGroupMethods#subject -
Other tags:
- Note: - `subject` was contributed by Joe Ferris to support the one-liner
def subject if defined?(@original_subject) @original_subject else @original_subject = instance_eval(&self.class.subject) end end