Class: RSpec::RubyContentMatchers::HaveClassSelf

Inherits:
RSpec::RubyContentMatcher show all
Defined in:
lib/code_spec/matchers/have_class_self.rb

Constant Summary

Constants inherited from RSpec::RubyContentMatcher

RSpec::RubyContentMatcher::ANY_GROUP, RSpec::RubyContentMatcher::LPAR, RSpec::RubyContentMatcher::OPT_ARGS, RSpec::RubyContentMatcher::OPT_SPACES, RSpec::RubyContentMatcher::Q_ANY_GROUP, RSpec::RubyContentMatcher::RPAR, RSpec::RubyContentMatcher::SPACES

Instance Attribute Summary

Attributes inherited from RSpec::RubyContentMatcher

#content, #content_matches, #end_option

Instance Method Summary collapse

Methods inherited from RSpec::RubyContentMatcher

#any_args_expr, #args_expr, #args_msg, #comment_end, #debug, #debug?, #debug_content, #display, #display_content, #end_expr, #get_expr, #handle_result, #index, #indexes, #is_match?, #matches?, #opt

Constructor Details

#initializeHaveClassSelf

Returns a new instance of HaveClassSelf.



11
12
13
# File 'lib/code_spec/matchers/have_class_self.rb', line 11

def initialize
  @end_option = 'class'
end

Instance Method Details

#failure_messageObject



15
16
17
18
# File 'lib/code_spec/matchers/have_class_self.rb', line 15

def failure_message
  super
  display "Expected there to be a: class << self"
end

#negative_failure_messageObject



20
21
22
23
# File 'lib/code_spec/matchers/have_class_self.rb', line 20

def negative_failure_message
  super
  display "Did not expect there to be a: class << self"
end