Sha256: 7458edb6cc97fd48e1ffc4b5b4481d3bec7bdccd15ac38b686f51d40608cda53
Contents?: true
Size: 1.62 KB
Versions: 1
Compression:
Stored size: 1.62 KB
Contents
module RSpec module Generator end end module RSpec module Rails end end module Rails module Generators end end module RSpec module RubyContentMatchers end end module RSpec module FileMatchers end end require_all File.dirname(__FILE__) + '/extensions' require_all File.dirname(__FILE__) + '/rails_helpers' require_all File.dirname(__FILE__) + '/helpers' require_all File.dirname(__FILE__) + '/rspec_generator' module RSpec::Core class ExampleGroup def with_generator &block RSpec::Generator.with_generator &block end def setup_generator test_method_name=nil, &block RSpec::Generator.setup_generator test_method_name, &block end end end class Class def use_orm orm class_eval do raise ArgumentError, "Unknown orm #{orm}" if ![:active_record, :mongoid, :mongo_mapper, :data_mapper].include?(orm) include "RSpec::Rails::Orm::#{orm.to_s.camelize}".constantize end end def helpers *types types.each{|type| include_helper type} end protected def include_helper type raise ArgumentError, "Can not specify for #{type}" if ![:migration, :model, :helper, :controller, :view, :observer, :mailer].include?(type) class_eval do include "RSpec::Rails::#{type.to_s.camelize}".constantize end end end require 'generator_spec/require_generator' require 'generator_spec/matchers/content/content_matcher' require_all File.dirname(__FILE__) + '/matchers/content' require_all File.dirname(__FILE__) + '/matchers/file' require_all File.dirname(__FILE__) + '/matchers/migration' require_all File.dirname(__FILE__) + '/matchers/helpers'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
generator-spec-0.4.8 | lib/generator_spec/main.rb |