spec/spec_helper.rb in hexp-0.4.4 vs spec/spec_helper.rb in hexp-0.4.5
- old
+ new
@@ -1,22 +1,19 @@
# encoding: utf-8
-# SimpleCov MUST be started before require 'hexp'
-#
-if ENV['COVERAGE'] == 'true'
- require 'simplecov'
- require 'coveralls'
+require 'hexp'
+require 'rspec/its'
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
- SimpleCov::Formatter::HTMLFormatter,
- Coveralls::SimpleCov::Formatter
- ]
-
- SimpleCov.start do
- command_name 'spec:unit'
- add_filter 'hexp/h.rb'
-
- minimum_coverage 98.5
+RSpec::Matchers.define :dom_eq do |other_dom|
+ match do |dom|
+ Hexp::Nokogiri::Equality.new(dom, other_dom).call
end
end
-require 'shared_helper'
+RSpec.configure do |rspec|
+ rspec.mock_with :rspec do |configuration|
+ configuration.syntax = :expect
+ end
+ rspec.around(:each) do |example|
+ Timeout.timeout(1, &example)
+ end
+end