Sha256: 5d417f5f3b76baf8f4c32b676114abe2dc452323fd50d172c8069b707ce82fcd

Contents?: true

Size: 513 Bytes

Versions: 41

Compression:

Stored size: 513 Bytes

Contents

require 'rails/generators/base'
require 'rspec/rails/version'

module Clearance
  module Generators
    class SpecsGenerator < Rails::Generators::Base
      source_root File.expand_path('../templates', __FILE__)

      def create_specs
        @helper_file = rspec_helper_file
        directory '.', 'spec'
      end

      private

      def rspec_helper_file
        if RSpec::Rails::Version::STRING.to_i > 2
          "rails_helper"
        else
          "spec_helper"
        end
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
clearance-2.9.3 lib/generators/clearance/specs/specs_generator.rb
clearance-2.9.2 lib/generators/clearance/specs/specs_generator.rb
clearance-2.9.1 lib/generators/clearance/specs/specs_generator.rb
clearance-2.9.0 lib/generators/clearance/specs/specs_generator.rb
clearance-2.8.0 lib/generators/clearance/specs/specs_generator.rb
clearance-2.7.2 lib/generators/clearance/specs/specs_generator.rb
clearance-2.7.0 lib/generators/clearance/specs/specs_generator.rb
clearance-2.6.2 lib/generators/clearance/specs/specs_generator.rb
clearance-2.6.1 lib/generators/clearance/specs/specs_generator.rb
clearance-2.6.0 lib/generators/clearance/specs/specs_generator.rb
clearance-2.5.0 lib/generators/clearance/specs/specs_generator.rb
clearance-2.4.0 lib/generators/clearance/specs/specs_generator.rb
clearance-2.3.1 lib/generators/clearance/specs/specs_generator.rb
clearance-2.3.0 lib/generators/clearance/specs/specs_generator.rb
clearance-2.2.1 lib/generators/clearance/specs/specs_generator.rb
clearance-2.2.0 lib/generators/clearance/specs/specs_generator.rb
clearance-2.1.0 lib/generators/clearance/specs/specs_generator.rb
clearance-2.0.0 lib/generators/clearance/specs/specs_generator.rb
clearance-2.0.0.beta2 lib/generators/clearance/specs/specs_generator.rb
clearance-2.0.0.beta1 lib/generators/clearance/specs/specs_generator.rb