Module: RSpec::RubyContent::Helpers

Defined in:
lib/code_spec/content_helpers.rb

Instance Method Summary collapse

Instance Method Details

#check_matchings(matchings) ⇒ Object Also known as: matchings



3
4
5
6
7
# File 'lib/code_spec/content_helpers.rb', line 3

def check_matchings matchings
  matchings.each do |matching|
    self.should match /#{Regexp.escape(matching)}/
  end
end

#check_methods(methods, type = nil) ⇒ Object Also known as: methods



11
12
13
14
15
# File 'lib/code_spec/content_helpers.rb', line 11

def check_methods methods, type=nil
  methods.each do |method_name|
    self.should have_method(method_name, type)
  end
end