Skip to content

Commit

Permalink
Test external gems too.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Mar 16, 2018
1 parent c517048 commit a05d93f
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,26 @@ require "rspec/core/rake_task"

RSpec::Core::RakeTask.new(:test)

task :default => :test
task :default => [:test, :external]

def clone_and_test(name)
sh("git clone https://git@github.com/socketry/#{name}")

# I tried using `bundle config --local local.async ../` but it simply doesn't work.
File.open("#{name}/Gemfile", "a") do |file|
file.puts('gem "async", path: "../"')
end

sh("cd #{name} && bundle install && bundle exec rake test")
end

task :external do
Bundler.with_clean_env do
clone_and_test("async-io")
clone_and_test("async-websocket")
clone_and_test("falcon")
end
end

task :coverage do
ENV['COVERAGE'] = 'y'
Expand Down

0 comments on commit a05d93f

Please sign in to comment.