Class: Clearance::Generators::SpecsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/clearance/specs/specs_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_specsObject



9
10
11
12
# File 'lib/generators/clearance/specs/specs_generator.rb', line 9

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

#rspec_helper_fileObject (private)



16
17
18
19
20
21
22
# File 'lib/generators/clearance/specs/specs_generator.rb', line 16

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