spec/support/generator_spec_helpers.rb in clearance-2.0.0 vs spec/support/generator_spec_helpers.rb in clearance-2.1.0
- old
+ new
@@ -16,11 +16,11 @@
def provide_existing_application_controller
copy_to_generator_root("app/controllers", "application_controller.rb")
end
def provide_existing_user_class
- copy_to_generator_root("app/models", versionize_template("user.rb"))
+ copy_to_generator_root("app/models", "user.rb")
allow(File).to receive(:exist?).and_call_original
allow(File).to receive(:exist?).with("app/models/user.rb").and_return(true)
end
private
@@ -29,13 +29,9 @@
template_file = File.join(TEMPLATE_PATH, destination, template)
destination = File.join(destination_root, destination)
FileUtils.mkdir_p(destination)
FileUtils.cp(template_file, destination)
- end
-
- def versionize_template(template_file)
- ["rails5", template_file].join("/")
end
end
RSpec.configure do |config|
config.include GeneratorSpecHelpers