Sha256: e5d07f9e638922881c63bf78127333d0cd154d8b2924ca4ff0d43ba2fac32fb0

Contents?: true

Size: 929 Bytes

Versions: 30

Compression:

Stored size: 929 Bytes

Contents

require 'generators/rspec'

module Rspec
  module Generators
    class IntegrationGenerator < Base
      class_option :request_specs,   :type => :boolean, :default => true,  :desc => "Generate request specs"
      class_option :webrat,          :type => :boolean, :default => false, :desc => "Use webrat methods/matchers"
      class_option :webrat_matchers, :type => :boolean, :default => false, :desc => "Use webrat methods/matchers (deprecated - use --webrat)"

      def generate_request_spec
        return unless options[:request_specs]

        template 'request_spec.rb',
                 File.join('spec/requests', class_path, "#{table_name}_spec.rb")
      end

    protected

      # @deprecated Use `--webrat` instead.
      def webrat?
        RSpec.deprecate("the --webrat-matchers option", "--webrat") if options[:webrat_matchers]
        options[:webrat] || options[:webrat_matchers]
      end

    end
  end
end

Version data entries

30 entries across 25 versions & 5 rubygems

Version Path
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-rails-2.13.0/lib/generators/rspec/integration/integration_generator.rb
rspec-rails-2.13.2 lib/generators/rspec/integration/integration_generator.rb
rspec-rails-2.13.1 lib/generators/rspec/integration/integration_generator.rb
rspec-rails-2.13.0 lib/generators/rspec/integration/integration_generator.rb
rspec-rails-2.12.2 lib/generators/rspec/integration/integration_generator.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/generators/rspec/integration/integration_generator.rb
rspec-rails-2.12.1 lib/generators/rspec/integration/integration_generator.rb
rspec-rails-2.12.0 lib/generators/rspec/integration/integration_generator.rb
rspec-rails-2.11.4 lib/generators/rspec/integration/integration_generator.rb
gem_repackager-0.1.0 support/gems/rspec-rails-2.11.0/lib/generators/rspec/integration/integration_generator.rb
rspec-rails-2.11.0 lib/generators/rspec/integration/integration_generator.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/generators/rspec/integration/integration_generator.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/generators/rspec/integration/integration_generator.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/generators/rspec/integration/integration_generator.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/generators/rspec/integration/integration_generator.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/generators/rspec/integration/integration_generator.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/generators/rspec/integration/integration_generator.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/generators/rspec/integration/integration_generator.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/generators/rspec/integration/integration_generator.rb
rails-uploader-0.0.4 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/generators/rspec/integration/integration_generator.rb