Sha256: f2cafc589a4f16bde5d1ad619997712dd39d9016349660532e104d065ebe64ed
Contents?: true
Size: 971 Bytes
Versions: 3
Compression:
Stored size: 971 Bytes
Contents
require 'rbconfig' # This generator bootstraps a Rails project for use with RSpec class RspecGenerator < Rails::Generator::Base DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']) def initialize(runtime_args, runtime_options = {}) super end def manifest record do |m| script_options = { :chmod => 0755, :shebang => options[:shebang] == DEFAULT_SHEBANG ? nil : options[:shebang] } m.directory 'spec' m.template 'spec_helper.rb', 'spec/spec_helper.rb' m.file 'spec.opts', 'spec/spec.opts' m.file 'previous_failures.txt', 'previous_failures.txt' m.file 'script/spec_server', 'script/spec_server', script_options m.file 'script/spec', 'script/spec', script_options end end protected def banner "Usage: #{$0} rspec" end end
Version data entries
3 entries across 3 versions & 1 rubygems