forked from dholdren/netflix-ruby
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
46 lines (35 loc) · 1.09 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# -*- encoding: utf-8 -*-
require 'rake/testtask'
lib = File.expand_path('../lib/', __FILE__)
$:.unshift lib unless $:.include?(lib)
Rake::TestTask.new("test:unit") { |t|
t.libs << 'test'
t.test_files = Dir.glob( "test/*_test.rb" ).sort
t.verbose = true
t.warning = true
}
require File.join(File.dirname(__FILE__), 'test/integration/rake_test_helper')
file "test/integration/oauth_settings.yml" do |t|
credentials = IntegrationTestHelper.obtain_credentials
open("test/integration/oauth_settings.yml", 'wb') do |f|
YAML.dump(credentials, f)
end
end
Rake::TestTask.new("test:integration") { |t|
#t.description = "Run integration tests against a REAL netflix account you supply"
t.libs << 'test'
t.test_files = Dir.glob( "test/integration/**/*_test.rb" ).sort
t.verbose = true
t.warning = true
}
task "test:integration" => "test/integration/oauth_settings.yml"
desc "run unit tests only"
task :test => "test:unit"
# Gem tasks
require "netflix/version"
task :build do
system "gem build .gemspec"
end
task :release => :build do
system "gem push bundler-#{Netflix::VERSION}"
end