Sha256: cb297cefa50a6acf2c73b57354077edd7fcc61c21bd762ccb14a3cba9e0b77b2
Contents?: true
Size: 866 Bytes
Versions: 2
Compression:
Stored size: 866 Bytes
Contents
module RSpec module Generator module Helpers def check_file file, type=nil, &block self.should generate_file(file, type, &block) end alias_method :file, :check_file def check_view(file_name, matchings) self.should generate_file(filename, :view) do |content| check_matchings matchings end end alias_method :view, :check_view def check_model(name, clazz, options = {}) self.should generate_file("#{name.underscore}.rb", :model) do |file_content| file_content.should have_class clazz.camelize 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 end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rspec_for_generators-0.2.1 | lib/rspec_for_generators/matchers/helpers/file.rb |
rspec_for_generators-0.2.0 | lib/rspec_for_generators/matchers/helpers/file.rb |