only run the EM specs if EM is installed

This commit is contained in:
Brian Lopez 2010-10-17 17:34:34 -07:00
parent 3b6229771a
commit 410e914411

View File

@ -1,8 +1,9 @@
# encoding: UTF-8 # encoding: UTF-8
require 'spec_helper' if defined? EventMachine
require 'mysql2/em' require 'spec_helper'
require 'mysql2/em'
describe Mysql2::EM::Client do describe Mysql2::EM::Client do
it "should support async queries" do it "should support async queries" do
results = [] results = []
EM.run do EM.run do
@ -42,4 +43,7 @@ describe Mysql2::EM::Client do
results[0].keys.should include("first_query") results[0].keys.should include("first_query")
results[1].keys.should include("second_query") results[1].keys.should include("second_query")
end end
end
else
puts "EventMachine not installed, skipping the specs that use it"
end end