lib/amqp-spec/rspec.rb in amqp-spec-0.3.0 vs lib/amqp-spec/rspec.rb in amqp-spec-0.3.1

- old
+ new

@@ -113,9 +113,12 @@ # Yields to block inside EM loop, :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 if it happens. # + # For compatibility with EM-Spec API, em method accepts either options Hash + # or numeric timeout in seconds. + # def em opts = {}, &block if opts.is_a? Hash opts[:spec_timeout] ||= self.class.default_timeout else opts = {spec_timeout: opts} \ No newline at end of file