spec/spec_helper.rb in axiom-0.1.1 vs spec/spec_helper.rb in axiom-0.2.0
- old
+ new
@@ -18,18 +18,20 @@
minimum_coverage 100
end
end
-require 'devtools/spec_helper'
require 'axiom'
+require 'devtools/spec_helper'
include Axiom
RSpec.configure do |config|
+ EMPTY_PROC = proc {}.freeze
+
config.expect_with :rspec do |expect_with|
- expect_with.syntax = [:expect, :should]
+ expect_with.syntax = :expect
end
# Record the original Attribute descendants
config.before do
@original_attribute_descendants = Attribute.descendants.dup
@@ -40,15 +42,15 @@
Attribute.descendants.replace(@original_attribute_descendants)
end
# Record the original Type descendants
config.before do
- Axiom::Types.finalize
- @original_type_descendants = Axiom::Types::Type.descendants.dup
+ Types.finalize
+ @original_type_descendants = Types::Type.descendants.dup
end
# Reset the Type descendants
config.after do
- Axiom::Types::Type.descendants.replace(@original_type_descendants)
- Axiom::Types.instance_variable_get(:@inference_cache).clear
+ Types::Type.descendants.replace(@original_type_descendants)
+ Types.instance_variable_get(:@inference_cache).clear
end
end