Sha256: d66593d4b6d70440a86b0c08df91544cfafe7013b941fc8f5c2151edfd67f913

Contents?: true

Size: 955 Bytes

Versions: 3

Compression:

Stored size: 955 Bytes

Contents

# 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['USE_RAILS']
  require 'rails'
  require 'rails/generators'
end  

module CustomActions
  def act_upon(file)
    say "Acted upon #{file}."
  end
end

if !defined?(Rails)
  require 'thor/group'
  require File.expand_path('support/generators/test_rails3/test_rails3_generator', File.dirname(__FILE__))
  require File.expand_path('support/generators/question/question_generator', File.dirname(__FILE__))
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

3 entries across 3 versions & 1 rubygems

Version Path
genspec-0.2.8 spec/spec_helper.rb
genspec-0.2.7 spec/spec_helper.rb
genspec-0.2.6 spec/spec_helper.rb