Permalink
Browse files

Sets bogus api key if api.yml does not exist during tests

  • Loading branch information...
1 parent 5d75707 commit 57c166ac6b4279952736f2d07eaa1618539daac1 @jeroenj committed Mar 3, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 Rakefile
View
@@ -9,4 +9,9 @@ RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = %w[--color]
end
-task :default => :spec
+task :default => [:copy, :spec]
+
+task :copy do
+ path = File.expand_path(File.dirname(__FILE__) + '/spec')
+ cp "#{path}/api.yml.example", "#{path}/api.yml" unless File.exists?("#{path}/api.yml")
+end

0 comments on commit 57c166a

Please sign in to comment.