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
1 changed files with 40 additions and 36 deletions

View File

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