lib/r_spec.rb in r_spec-0.3.3 vs lib/r_spec.rb in r_spec-1.0.0.beta1
- old
+ new
@@ -1,33 +1,16 @@
# frozen_string_literal: true
-require 'matchi/rspec'
-require 'fix/expect'
-require 'fix/its'
-
-# Namespace for the R Spec framework.
+# Namespace for the RSpec framework.
#
# @api public
#
module RSpec
# Specs are built with this method.
- #
- # @example The answer must be equal to 42.
- # describe('the answer') do
- # it { expect(42).to be 42 }
- # end
- #
- # @param front_object [#object_id] The front object.
- # @param options [Hash] Some options.
- # @param specs [Proc] The set of specs.
- #
- # @raise [SystemExit] The result of the test.
- def self.describe(front_object, options = {}, &specs)
- t = ::Fix::Test.new(front_object, options, &specs)
+ def self.describe(const, &block)
+ raise ::TypeError, const.class.inspect unless const.is_a?(::Module)
- print t.report.to_s if options.fetch(:verbose, true)
- exit t.pass?
+ DSL.describe(const, &block)
end
end
-require_relative File.join 'fix', 'it'
-require_relative File.join 'fix', 'on'
+require_relative File.join("r_spec", "dsl")