test/unit/assertions_tests.rb in assert-2.19.2 vs test/unit/assertions_tests.rb in assert-2.19.3

- old
+ new

@@ -6,25 +6,30 @@ module Assert::Assertions class UnitTests < Assert::Context include Assert::Test::TestHelpers desc "Assert::Context" - subject { context_class1.new(test1, test1.config, proc { |r| }) } + subject{ context_class1.new(test1, test1.config, proc{ |r| }) } - let(:context_class1) { Factory.modes_off_context_class } - let(:test1) { Factory.test } + let(:context_class1){ Factory.modes_off_context_class } + let(:test1){ Factory.test } should have_imeths :assert_block, :assert_not_block, :refute_block should have_imeths :assert_empty, :assert_not_empty, :refute_empty should have_imeths :assert_equal, :assert_not_equal, :refute_equal - should have_imeths :assert_file_exists, :assert_not_file_exists, :refute_file_exists + should have_imeths :assert_file_exists, :assert_not_file_exists + should have_imeths :refute_file_exists 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_instance_of, :assert_not_instance_of, :refute_instance_of + should have_imeths :assert_instance_of, :assert_not_instance_of + should have_imeths :refute_instance_of + should have_imeths :assert_is_a, :assert_is_not_a, :assert_not_a + should have_imeths :refute_is_a should have_imeths :assert_kind_of, :assert_not_kind_of, :refute_kind_of - should have_imeths :assert_match, :assert_not_match, :assert_no_match, :refute_match + should have_imeths :assert_match, :assert_not_match, :assert_no_match + should have_imeths :refute_match 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_raises, :assert_not_raises should have_imeths :assert_raise, :assert_not_raise, :assert_nothing_raised @@ -39,17 +44,17 @@ desc "ignored assertions helpers" setup do tests.each{ |test| test.run(&test_run_callback) } end - let(:tests) { + let(:tests) do context_info = Factory.context_info(context_class1) Assert::Assertions::IGNORED_ASSERTION_HELPERS.map do |helper| Factory.test("ignored assertion helper #{helper}", context_info) do - self.send(helper, "doesn't matter") + send(helper, "doesn't matter") end end - } + end should "have an ignored result for each helper in the constant" do exp = Assert::Assertions::IGNORED_ASSERTION_HELPERS.size assert_that(test_run_result_count).equals(exp)