whats_up 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/whats_up.rb +12 -12
- data/lib/whats_up/method_finder.rb +3 -3
- data/lib/whats_up/version.rb +1 -1
- metadata +1 -1
data/lib/whats_up.rb
CHANGED
@@ -33,25 +33,25 @@ class Object
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
def what_equals(expected_result, *args)
|
37
|
-
show_methods expected_result, {}, *args
|
36
|
+
def what_equals(expected_result, *args, &block)
|
37
|
+
show_methods expected_result, {}, *args, &block
|
38
38
|
end
|
39
39
|
|
40
|
-
def whats_exactly(expected_result, *args)
|
41
|
-
show_methods expected_result, { force_exact: true }, *args
|
40
|
+
def whats_exactly(expected_result, *args, &block)
|
41
|
+
show_methods expected_result, { force_exact: true }, *args, &block
|
42
42
|
end
|
43
43
|
|
44
|
-
def what_matches(expected_result, *args)
|
45
|
-
show_methods expected_result, { force_regex: true }, *args
|
44
|
+
def what_matches(expected_result, *args, &block)
|
45
|
+
show_methods expected_result, { force_regex: true }, *args, &block
|
46
46
|
end
|
47
47
|
|
48
|
-
def what_works_with(*args)
|
49
|
-
show_methods nil, { show_all: true }, *args
|
48
|
+
def what_works_with(*args, &block)
|
49
|
+
show_methods nil, { show_all: true }, *args, &block
|
50
50
|
end
|
51
51
|
alias :what_works :what_works_with
|
52
52
|
|
53
|
-
def whats_not_blank_with(*args)
|
54
|
-
show_methods nil, { show_all: true, exclude_blank: true }, *args
|
53
|
+
def whats_not_blank_with(*args, &block)
|
54
|
+
show_methods nil, { show_all: true, exclude_blank: true }, *args, &block
|
55
55
|
end
|
56
56
|
alias :whats_not_blank :whats_not_blank_with
|
57
57
|
|
@@ -65,9 +65,9 @@ class Object
|
|
65
65
|
|
66
66
|
private
|
67
67
|
|
68
|
-
def show_methods(expected_result, opts = {}, *args)
|
68
|
+
def show_methods(expected_result, opts = {}, *args, &block)
|
69
69
|
@args = args unless args.empty?
|
70
|
-
WhatsUp::MethodFinder.show(self, expected_result, opts, *@args)
|
70
|
+
WhatsUp::MethodFinder.show(self, expected_result, opts, *@args, &block)
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
@@ -65,10 +65,10 @@ module WhatsUp
|
|
65
65
|
# Pretty-prints the results of the previous method
|
66
66
|
def show(an_object, expected_result, opts = {}, *args, &block)
|
67
67
|
opts = {
|
68
|
-
|
68
|
+
exclude_blank: false,
|
69
69
|
force_exact: false,
|
70
|
-
|
71
|
-
|
70
|
+
force_regex: false,
|
71
|
+
show_all: false
|
72
72
|
}.merge(opts)
|
73
73
|
|
74
74
|
found = find(an_object, expected_result, opts, *args, &block)
|
data/lib/whats_up/version.rb
CHANGED