assert 2.19.0 → 2.19.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -2
- data/assert.gemspec +5 -3
- data/bin/assert +1 -0
- data/lib/assert.rb +2 -0
- data/lib/assert/actual_value.rb +3 -0
- data/lib/assert/assert_runner.rb +2 -0
- data/lib/assert/assertions.rb +2 -0
- data/lib/assert/cli.rb +2 -0
- data/lib/assert/config.rb +2 -0
- data/lib/assert/config_helpers.rb +2 -0
- data/lib/assert/context.rb +2 -0
- data/lib/assert/context/let_dsl.rb +3 -0
- data/lib/assert/context/method_missing.rb +3 -0
- data/lib/assert/context/setup_dsl.rb +3 -0
- data/lib/assert/context/subject_dsl.rb +3 -0
- data/lib/assert/context/suite_dsl.rb +3 -0
- data/lib/assert/context/test_dsl.rb +3 -0
- data/lib/assert/context_info.rb +2 -0
- data/lib/assert/default_runner.rb +2 -0
- data/lib/assert/default_suite.rb +2 -0
- data/lib/assert/default_view.rb +2 -0
- data/lib/assert/factory.rb +2 -0
- data/lib/assert/file_line.rb +2 -0
- data/lib/assert/macro.rb +2 -0
- data/lib/assert/macros/methods.rb +2 -0
- data/lib/assert/result.rb +3 -0
- data/lib/assert/runner.rb +2 -0
- data/lib/assert/stub.rb +2 -0
- data/lib/assert/suite.rb +2 -0
- data/lib/assert/test.rb +3 -1
- data/lib/assert/utils.rb +3 -1
- data/lib/assert/version.rb +3 -1
- data/lib/assert/view.rb +2 -0
- data/lib/assert/view_helpers.rb +2 -0
- data/test/helper.rb +5 -3
- data/test/support/factory.rb +2 -0
- data/test/support/inherited_stuff.rb +2 -0
- data/test/system/stub_tests.rb +2 -0
- data/test/system/test_tests.rb +2 -0
- data/test/unit/actual_value_tests.rb +2 -0
- data/test/unit/assert_tests.rb +3 -1
- data/test/unit/assertions/assert_block_tests.rb +2 -0
- data/test/unit/assertions/assert_changes_tests.rb +2 -0
- data/test/unit/assertions/assert_empty_tests.rb +2 -0
- data/test/unit/assertions/assert_equal_tests.rb +2 -0
- data/test/unit/assertions/assert_file_exists_tests.rb +2 -0
- data/test/unit/assertions/assert_includes_tests.rb +2 -0
- data/test/unit/assertions/assert_instance_of_tests.rb +2 -0
- data/test/unit/assertions/assert_kind_of_tests.rb +2 -0
- data/test/unit/assertions/assert_match_tests.rb +2 -0
- data/test/unit/assertions/assert_nil_tests.rb +2 -0
- data/test/unit/assertions/assert_raises_tests.rb +2 -0
- data/test/unit/assertions/assert_respond_to_tests.rb +2 -0
- data/test/unit/assertions/assert_same_tests.rb +2 -0
- data/test/unit/assertions/assert_true_false_tests.rb +2 -0
- data/test/unit/assertions_tests.rb +2 -0
- data/test/unit/config_helpers_tests.rb +2 -0
- data/test/unit/config_tests.rb +2 -0
- data/test/unit/context/let_dsl_tests.rb +2 -0
- data/test/unit/context/setup_dsl_tests.rb +2 -0
- data/test/unit/context/subject_dsl_tests.rb +2 -0
- data/test/unit/context/suite_dsl_tests.rb +2 -0
- data/test/unit/context/test_dsl_tests.rb +2 -0
- data/test/unit/context_info_tests.rb +2 -0
- data/test/unit/context_tests.rb +2 -0
- data/test/unit/default_runner_tests.rb +2 -0
- data/test/unit/default_suite_tests.rb +2 -0
- data/test/unit/factory_tests.rb +2 -0
- data/test/unit/file_line_tests.rb +2 -0
- data/test/unit/macro_tests.rb +2 -0
- data/test/unit/result_tests.rb +2 -0
- data/test/unit/runner_tests.rb +4 -2
- data/test/unit/suite_tests.rb +2 -0
- data/test/unit/test_tests.rb +2 -0
- data/test/unit/utils_tests.rb +4 -2
- data/test/unit/view_helpers_tests.rb +3 -1
- data/test/unit/view_tests.rb +3 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb7d42eb2185251217dae19781d2094535c5157e3331f11dc2e4ef7231f1c8a5
|
4
|
+
data.tar.gz: a70d2f737ead843cd0221c7e7ec19b480063867fce2c5b8c532fcb5d9faae735
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8286bebe4994b44d2a833101905d8381a5906bd4bc9ba7f0c2b93523724edfd8d7049c3866a8b6b792d09d5984d9aafe304cd9d498714177b41301d4d99890f
|
7
|
+
data.tar.gz: 5a92c2a699742fcdb8e44a3c897af7c595a678e7b4124b0c9972ab2df2b341586b2718fad7873e97afab4e37bc7252b1afa7dcfb2d3016383b92989af1c5d105
|
data/Gemfile
CHANGED
data/assert.gemspec
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# -*- encoding: utf-8 -*-
|
2
4
|
lib = File.expand_path("../lib", __FILE__)
|
3
5
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
@@ -20,7 +22,7 @@ Gem::Specification.new do |gem|
|
|
20
22
|
|
21
23
|
gem.required_ruby_version = "~> 2.5"
|
22
24
|
|
23
|
-
gem.add_dependency("much-factory", ["~> 0.
|
24
|
-
gem.add_dependency("much-not-given", ["~> 0.1.
|
25
|
-
gem.add_dependency("much-stub", ["~> 0.1.
|
25
|
+
gem.add_dependency("much-factory", ["~> 0.2.0"])
|
26
|
+
gem.add_dependency("much-not-given", ["~> 0.1.1"])
|
27
|
+
gem.add_dependency("much-stub", ["~> 0.1.6"])
|
26
28
|
end
|
data/bin/assert
CHANGED
data/lib/assert.rb
CHANGED
data/lib/assert/actual_value.rb
CHANGED
data/lib/assert/assert_runner.rb
CHANGED
data/lib/assert/assertions.rb
CHANGED
data/lib/assert/cli.rb
CHANGED
data/lib/assert/config.rb
CHANGED
data/lib/assert/context.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "assert/assertions"
|
2
4
|
|
3
5
|
module Assert; end
|
4
6
|
class Assert::Context; end
|
7
|
+
|
5
8
|
module Assert::Context::MethodMissing
|
6
9
|
def method_missing(method, *args, &block)
|
7
10
|
if Assert::Assertions::IGNORED_ASSERTION_HELPERS.include?(method.to_sym)
|
@@ -1,9 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "assert/context_info"
|
2
4
|
require "assert/macro"
|
3
5
|
require "assert/suite"
|
4
6
|
require "assert/test"
|
5
7
|
|
6
8
|
module Assert; end
|
9
|
+
|
7
10
|
class Assert::Context
|
8
11
|
module TestDSL
|
9
12
|
def test(desc_or_macro, called_from = nil, first_caller = nil, &block)
|
data/lib/assert/context_info.rb
CHANGED
data/lib/assert/default_suite.rb
CHANGED
data/lib/assert/default_view.rb
CHANGED
data/lib/assert/factory.rb
CHANGED
data/lib/assert/file_line.rb
CHANGED
data/lib/assert/macro.rb
CHANGED
data/lib/assert/result.rb
CHANGED
data/lib/assert/runner.rb
CHANGED
data/lib/assert/stub.rb
CHANGED
data/lib/assert/suite.rb
CHANGED
data/lib/assert/test.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "stringio"
|
2
4
|
require "assert/file_line"
|
3
5
|
require "assert/result"
|
@@ -37,7 +39,7 @@ module Assert
|
|
37
39
|
end
|
38
40
|
|
39
41
|
def output
|
40
|
-
@output ||= (@build_data[:output] || "")
|
42
|
+
@output ||= (@build_data[:output] || +"")
|
41
43
|
end
|
42
44
|
|
43
45
|
def run_time
|
data/lib/assert/utils.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "assert"
|
2
4
|
|
3
5
|
module Assert
|
@@ -29,7 +31,7 @@ module Assert
|
|
29
31
|
# Get a proc that uses stdlib `PP.pp` to pretty print objects
|
30
32
|
def self.stdlib_pp_proc(width = nil)
|
31
33
|
require "pp"
|
32
|
-
Proc.new{ |obj| PP.pp(obj, "", width || 79).strip }
|
34
|
+
Proc.new{ |obj| PP.pp(obj, +"", width || 79).strip }
|
33
35
|
end
|
34
36
|
|
35
37
|
# Return true if if either show output has newlines or is bigger than 29 chars
|
data/lib/assert/version.rb
CHANGED
data/lib/assert/view.rb
CHANGED
data/lib/assert/view_helpers.rb
CHANGED
data/test/helper.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
-
#
|
2
|
-
# put any test helpers here
|
1
|
+
# frozen_string_literal: true
|
3
2
|
|
4
|
-
#
|
3
|
+
# This file is automatically required when you run `assert`; put any test
|
4
|
+
# helpers here.
|
5
|
+
|
6
|
+
# Add the root dir to the load path.
|
5
7
|
ROOT_PATH = File.expand_path("../..", __FILE__)
|
6
8
|
$LOAD_PATH.unshift(ROOT_PATH)
|
7
9
|
|
data/test/support/factory.rb
CHANGED
data/test/system/stub_tests.rb
CHANGED
data/test/system/test_tests.rb
CHANGED
data/test/unit/assert_tests.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "assert"
|
2
4
|
|
3
5
|
require "assert/config"
|
@@ -96,7 +98,7 @@ module Assert
|
|
96
98
|
should "auto-unstub any stubs on teardown" do
|
97
99
|
context_class = ::Factory.modes_off_context_class do
|
98
100
|
setup do
|
99
|
-
Assert.stub("1", :to_s){ "one" }
|
101
|
+
Assert.stub(+"1", :to_s){ "one" }
|
100
102
|
end
|
101
103
|
end
|
102
104
|
|
data/test/unit/config_tests.rb
CHANGED
data/test/unit/context_tests.rb
CHANGED
data/test/unit/factory_tests.rb
CHANGED
data/test/unit/macro_tests.rb
CHANGED
data/test/unit/result_tests.rb
CHANGED
data/test/unit/runner_tests.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "assert"
|
2
4
|
require "assert/runner"
|
3
5
|
|
@@ -25,7 +27,7 @@ class Assert::Runner
|
|
25
27
|
|
26
28
|
setup do
|
27
29
|
config1.suite Assert::DefaultSuite.new(config1)
|
28
|
-
config1.view Assert::View.new(config1, StringIO.new("", "w+"))
|
30
|
+
config1.view Assert::View.new(config1, StringIO.new(+"", "w+"))
|
29
31
|
end
|
30
32
|
|
31
33
|
let(:config1) { Factory.modes_off_config }
|
@@ -50,7 +52,7 @@ class Assert::Runner
|
|
50
52
|
subject { runner_class1.new(config1) }
|
51
53
|
|
52
54
|
setup do
|
53
|
-
@view_output = ""
|
55
|
+
@view_output = +""
|
54
56
|
|
55
57
|
suite_class = Class.new(Assert::DefaultSuite){ include CallbackMixin }
|
56
58
|
view_class = Class.new(Assert::View){ include CallbackMixin }
|
data/test/unit/suite_tests.rb
CHANGED
data/test/unit/test_tests.rb
CHANGED
data/test/unit/utils_tests.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "assert"
|
2
4
|
require "assert/utils"
|
3
5
|
|
@@ -78,12 +80,12 @@ module Assert::Utils
|
|
78
80
|
desc "`stdlib_pp_proc`"
|
79
81
|
|
80
82
|
should "build a pp proc that uses stdlib `PP.pp` to pretty print objects" do
|
81
|
-
exp_obj_pps = objs1.map{ |o| PP.pp(o, "", 79).strip }
|
83
|
+
exp_obj_pps = objs1.map{ |o| PP.pp(o, +"", 79).strip }
|
82
84
|
act_obj_pps = objs1.map{ |o| subject.stdlib_pp_proc.call(o) }
|
83
85
|
assert_that(act_obj_pps).equals(exp_obj_pps)
|
84
86
|
|
85
87
|
cust_width = 1
|
86
|
-
exp_obj_pps = objs1.map{ |o| PP.pp(o, "", cust_width).strip }
|
88
|
+
exp_obj_pps = objs1.map{ |o| PP.pp(o, +"", cust_width).strip }
|
87
89
|
act_obj_pps = objs1.map{ |o| subject.stdlib_pp_proc(cust_width).call(o) }
|
88
90
|
assert_that(act_obj_pps).equals(exp_obj_pps)
|
89
91
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "assert"
|
2
4
|
require "assert/view_helpers"
|
3
5
|
|
@@ -163,7 +165,7 @@ module Assert::ViewHelpers
|
|
163
165
|
subject { view1 }
|
164
166
|
|
165
167
|
let(:view_class1) { Class.new(Assert::View){ include Ansi } }
|
166
|
-
let(:view1) { view_class1.new(Factory.modes_off_config, StringIO.new("", "w+")) }
|
168
|
+
let(:view1) { view_class1.new(Factory.modes_off_config, StringIO.new(+"", "w+")) }
|
167
169
|
|
168
170
|
should have_imeths :ansi_styled_msg
|
169
171
|
|
data/test/unit/view_tests.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "assert"
|
2
4
|
require "assert/view"
|
3
5
|
|
@@ -28,7 +30,7 @@ class Assert::View
|
|
28
30
|
desc "when init"
|
29
31
|
subject { Assert::View.new(config1, io1) }
|
30
32
|
|
31
|
-
let(:io1) { StringIO.new("", "w+") }
|
33
|
+
let(:io1) { StringIO.new(+"", "w+") }
|
32
34
|
let(:config1) { Factory.modes_off_config }
|
33
35
|
|
34
36
|
should have_readers :config
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: assert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.19.
|
4
|
+
version: 2.19.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kelly Redding
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-01-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: much-factory
|
@@ -17,42 +17,42 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.
|
20
|
+
version: 0.2.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.
|
27
|
+
version: 0.2.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: much-not-given
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.1.
|
34
|
+
version: 0.1.1
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.1.
|
41
|
+
version: 0.1.1
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: much-stub
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 0.1.
|
48
|
+
version: 0.1.6
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.1.
|
55
|
+
version: 0.1.6
|
56
56
|
description: Assertion style testing framework.
|
57
57
|
email:
|
58
58
|
- kelly@kellyredding.com
|