Sha256: bb0a90b9c1b0bd54061dd90c2d7719d0b9047e73e6d2e5995c1e303ffda5794e
Contents?: true
Size: 821 Bytes
Versions: 12
Compression:
Stored size: 821 Bytes
Contents
module RSpec::Generator module Helpers def check_file file_name, type=nil, &block self.should generate_file(file_name, type, &block) end alias_method :file, :check_file def check_view(file_name, matchings) self.should generate_file(file_name, :view) do |content| check_matchings matchings end end alias_method :view, :check_view def check_model(file_name, clazz, options = {}) self.should generate_file("#{file_name.underscore}.rb", :model) do |file_content| file_content.should have_class clazz do |content| check_matchings options[:matchings] check_methods(options[:methods]) check_class_methods(options[:class_methods]) end end end alias_method :model, :check_model end end
Version data entries
12 entries across 12 versions & 1 rubygems