lib/generators/sauce_generator.rb in sauce-0.12.6 vs lib/generators/sauce_generator.rb in sauce-0.12.7

- old
+ new

@@ -6,19 +6,25 @@ def copy_rake_tasks copy_file "sauce.rake", "lib/tasks/sauce.rake" end + def configure_credentials + system("sauce config #{username} #{api_key}") + end + def setup_spec if File.directory? 'spec' empty_directory "spec/selenium" append_file "spec/spec_helper.rb", generate_config end end def setup_test - empty_directory "test/selenium" - append_file "test/test_helper.rb", generate_config + if File.directory? 'test' + empty_directory "test/selenium" + append_file "test/test_helper.rb", generate_config + end end private def generate_config