Module: RSpec::RubyContent::Helpers

Defined in:
lib/rspec_for_generators/matchers/helpers/content.rb

Instance Method Summary collapse

Instance Method Details

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



4
5
6
7
8
# File 'lib/rspec_for_generators/matchers/helpers/content.rb', line 4

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



12
13
14
15
16
# File 'lib/rspec_for_generators/matchers/helpers/content.rb', line 12

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