Sha256: a669ec1308c543b2b8ece9a7e4b27140dde9e49218cdb6d62413fddc7dd78863

Contents?: true

Size: 472 Bytes

Versions: 4

Compression:

Stored size: 472 Bytes

Contents

module RSpec
  module RubyContent
    module Helpers
      def check_matchings matchings
        matchings.each do |matching|
          self.should match /#{Regexp.escape(matching)}/
        end
      end
      alias_method :matchings, :check_matchings 


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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rspec_for_generators-0.3.1 lib/rspec_for_generators/matchers/helpers/content.rb
rspec_for_generators-0.3.0 lib/rspec_for_generators/matchers/helpers/content.rb
rspec_for_generators-0.2.1 lib/rspec_for_generators/matchers/helpers/content.rb
rspec_for_generators-0.2.0 lib/rspec_for_generators/matchers/helpers/content.rb