lib/dummier/app_generator.rb in dummier-0.2.1 vs lib/dummier/app_generator.rb in dummier-0.2.2
- old
+ new
@@ -20,11 +20,11 @@
@root_path = File.expand_path(root)
@destination_stack = []
@options = defaults.merge(options)
self.source_paths << File.join(root_path, "test", "dummy_hooks", "templates")
self.destination_root = File.join(test_path, name)
- raise "Invalid directory!" unless Dir.exists?(@root_path)
+ raise "Invalid directory!" unless File.directory?(@root_path)
end
# The name of the rails application
def name
"dummy"
@@ -115,10 +115,10 @@
# replace crucial templates
template "rails/application.rb", "config/application.rb", :force => true
template "rails/boot.rb", "config/boot.rb", :force => true
# add cucumber to database.yml
- cukes = Dir.exists?(File.join(root_path, "features"))
+ cukes = File.directory?(File.join(root_path, "features"))
if cukes
append_file "config/database.yml" do
%(
cucumber:
<<: *test
\ No newline at end of file