lib/amqp-spec/rspec.rb in amqp-spec-0.1.8 vs lib/amqp-spec/rspec.rb in amqp-spec-0.1.10

- old
+ new

@@ -60,25 +60,19 @@ @@_em_default_options = {} @@_em_default_timeout = nil def self.default_spec_timeout(spec_timeout=nil) - if spec_timeout - @@_em_default_timeout = spec_timeout - else - @@_em_default_timeout - end + @@_em_default_timeout = spec_timeout if spec_timeout + @@_em_default_timeout end alias default_timeout default_spec_timeout def self.default_options(opts=nil) - if opts - @@_em_default_options = opts - else - @@_em_default_options - end + @@_em_default_options = opts if opts + @@_em_default_options end end end end @@ -90,10 +84,10 @@ # * :timeout => Numeric (default nil) - *Connection* timeout, measured in seconds. # * :logging => true | false (default false) - Toggle the extremely verbose AMQP logging. # # In addition to EM and AMQP options, :spec_timeout option (in seconds) is used to force spec to timeout # if something goes wrong and EM/AMQP loop hangs for some reason. SpecTimeoutExceededError is raised. - + # def amqp opts={}, &block opts = @@_em_default_options.merge opts begin EM.run do # begin ?