Sha256: 71d70d24969d7372e43714dd83ffab2838f0394212ae94f635a6106c8d5dd23a
Contents?: true
Size: 1.7 KB
Versions: 1
Compression:
Stored size: 1.7 KB
Contents
require 'coveralls' Coveralls.wear_merged! # Having ./support in the load path means Rails will load the generators at # ./support/generators/**/*_generator.rb and # ./support/rails/generators/**/*_generator.rb $LOAD_PATH.push File.join(File.dirname(__FILE__), "support") require 'bundler' Bundler.setup if ENV['RAILS_VERSION'] != 'none' require 'rails' require 'rails/generators' elsif ENV['DEFINE_RAILS_MODULE'] # Rails module can be defined while missing common constants like VERSION # if you pull in a rails component like ActiveRecord, then require the # activerecord generators. Maybe this can happen in other scenarios too. # Anyway the existence of a Rails module alone should not break genspec. module Rails; end end module CustomActions def act_upon(file) say "Acted upon #{file}." end end require 'genspec' # always load this one, because we'll reference it by class name in specs, # so it has to be defined before they load. require File.expand_path('support/generators/question/question_generator', File.dirname(__FILE__)) unless GenSpec.rails? # only load this one when rails isn't around, because rails should autoload # it if rails is in use require 'thor/group' require File.expand_path('support/generators/test_rails3/test_rails3_generator', File.dirname(__FILE__)) end if RSpec::Expectations.respond_to?(:configuration) RSpec::Expectations.configuration.on_potential_false_positives = :nothing end RSpec.configure do |c| c.before { GenSpec.root = File.expand_path('../tmp', File.dirname(__FILE__)) } if RUBY_PLATFORM =~ /java/i end require File.join(File.dirname(__FILE__),"../lib/gen_spec") GenSpec::Matchers::GenerationMethodMatcher::GENERATION_CLASSES << "CustomActions"
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
genspec-0.3.2 | spec/spec_helper.rb |