test/unit/assertions_tests.rb in assert-2.4.0 vs test/unit/assertions_tests.rb in assert-2.5.0
- old
+ new
@@ -1,16 +1,16 @@
require 'assert'
require 'assert/assertions'
module Assert::Assertions
- class BasicTests < Assert::Context
-
+ class UnitTests < Assert::Context
desc "An assert context"
setup do
- @context_class = Factory.context_class
- @context = @context_class.new
+ @context_class = Factory.modes_off_context_class
+ @test = Factory.test
+ @context = @context_class.new(@test, @test.config)
end
subject{ @context }
should have_imeths :assert_block, :assert_not_block, :refute_block
should have_imeths :assert_raises, :assert_not_raises
@@ -26,14 +26,16 @@
should have_imeths :assert_empty, :assert_not_empty, :refute_empty
should have_imeths :assert_includes, :assert_not_includes
should have_imeths :assert_included, :assert_not_included
should have_imeths :refute_includes, :refute_included
should have_imeths :assert_nil, :assert_not_nil, :refute_nil
+ should have_imeths :assert_true, :assert_not_true, :refute_true
+ should have_imeths :assert_false, :assert_not_false, :refute_false
should have_imeths :assert_file_exists, :assert_not_file_exists, :refute_file_exists
end
- class IgnoredTests < BasicTests
+ class IgnoredTests < UnitTests
desc "ignored assertions helpers"
setup do
@tests = Assert::Assertions::IGNORED_ASSERTION_HELPERS.map do |helper|
context_info = Factory.context_info(@context_class)
Factory.test("ignored assertion helper #{helper}", context_info) do