nrser 0.3.9 → 0.3.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nrser/char/alpha_numeric_sub.rb +9 -19
- data/lib/nrser/char/special.rb +5 -5
- data/lib/nrser/core_ext/array.rb +36 -13
- data/lib/nrser/core_ext/enumerable.rb +1 -0
- data/lib/nrser/core_ext/enumerable/find_map.rb +1 -1
- data/lib/nrser/core_ext/hash/bury.rb +3 -0
- data/lib/nrser/core_ext/hash/extract_values_at.rb +2 -2
- data/lib/nrser/core_ext/method/full_name.rb +1 -1
- data/lib/nrser/core_ext/module/method_objects.rb +1 -1
- data/lib/nrser/core_ext/module/source_locations.rb +27 -15
- data/lib/nrser/core_ext/object/lazy_var.rb +1 -1
- data/lib/nrser/core_ext/pathname.rb +67 -12
- data/lib/nrser/core_ext/pathname/subpath.rb +86 -0
- data/lib/nrser/core_ext/string.rb +28 -1
- data/lib/nrser/core_ext/symbol.rb +11 -12
- data/lib/nrser/errors/README.md +154 -0
- data/lib/nrser/errors/attr_error.rb +146 -53
- data/lib/nrser/errors/count_error.rb +61 -12
- data/lib/nrser/errors/nicer_error.rb +42 -71
- data/lib/nrser/errors/value_error.rb +53 -58
- data/lib/nrser/functions.rb +0 -2
- data/lib/nrser/functions/enumerable.rb +5 -17
- data/lib/nrser/functions/enumerable/associate.rb +14 -5
- data/lib/nrser/functions/enumerable/find_all_map.rb +1 -1
- data/lib/nrser/functions/enumerable/include_slice/array_include_slice.rb +1 -1
- data/lib/nrser/functions/hash/bury.rb +2 -12
- data/lib/nrser/functions/merge_by.rb +2 -2
- data/lib/nrser/functions/module/method_objects.rb +2 -2
- data/lib/nrser/functions/path.rb +185 -165
- data/lib/nrser/functions/path/normalized.rb +84 -0
- data/lib/nrser/functions/string.rb +4 -4
- data/lib/nrser/functions/text/README.md +4 -0
- data/lib/nrser/functions/text/format.rb +53 -0
- data/lib/nrser/functions/text/indentation.rb +6 -6
- data/lib/nrser/functions/text/word_wrap.rb +2 -2
- data/lib/nrser/functions/tree/map_leaves.rb +3 -3
- data/lib/nrser/functions/tree/map_tree.rb +2 -2
- data/lib/nrser/functions/tree/transform.rb +1 -18
- data/lib/nrser/gem_ext/README.md +4 -0
- data/lib/nrser/labs/README.md +8 -0
- data/lib/nrser/labs/config.rb +163 -0
- data/lib/nrser/labs/i8.rb +49 -159
- data/lib/nrser/labs/i8/struct.rb +167 -0
- data/lib/nrser/labs/i8/struct/hash.rb +140 -0
- data/lib/nrser/labs/i8/struct/vector.rb +149 -0
- data/lib/nrser/labs/i8/surjection.rb +211 -0
- data/lib/nrser/labs/lots/consumer.rb +19 -0
- data/lib/nrser/labs/lots/parser.rb +21 -1
- data/lib/nrser/labs/stash.rb +4 -4
- data/lib/nrser/log.rb +25 -21
- data/lib/nrser/log/appender/sync.rb +15 -11
- data/lib/nrser/log/formatters/color.rb +0 -3
- data/lib/nrser/log/formatters/mixin.rb +4 -4
- data/lib/nrser/log/logger.rb +54 -6
- data/lib/nrser/log/mixin.rb +2 -1
- data/lib/nrser/log/plugin.rb +6 -6
- data/lib/nrser/log/types.rb +46 -29
- data/lib/nrser/mean_streak.rb +0 -8
- data/lib/nrser/mean_streak/document.rb +1 -4
- data/lib/nrser/message.rb +3 -3
- data/lib/nrser/meta/README.md +4 -0
- data/lib/nrser/meta/lazy_attr.rb +2 -2
- data/lib/nrser/meta/source/location.rb +1 -1
- data/lib/nrser/props.rb +34 -3
- data/lib/nrser/props/class_methods.rb +2 -1
- data/lib/nrser/props/instance_methods.rb +9 -9
- data/lib/nrser/props/metadata.rb +4 -12
- data/lib/nrser/props/mutable/stash.rb +5 -2
- data/lib/nrser/props/prop.rb +10 -19
- data/lib/nrser/rspex.rb +1 -20
- data/lib/nrser/rspex/example_group/describe_attribute.rb +3 -0
- data/lib/nrser/rspex/example_group/describe_called_with.rb +9 -4
- data/lib/nrser/rspex/example_group/describe_case.rb +1 -0
- data/lib/nrser/rspex/example_group/describe_class.rb +2 -0
- data/lib/nrser/rspex/example_group/describe_group.rb +1 -1
- data/lib/nrser/rspex/example_group/describe_instance.rb +3 -1
- data/lib/nrser/rspex/example_group/describe_message.rb +1 -1
- data/lib/nrser/rspex/example_group/describe_method.rb +64 -30
- data/lib/nrser/rspex/example_group/describe_response_to.rb +1 -1
- data/lib/nrser/rspex/example_group/describe_section.rb +4 -1
- data/lib/nrser/rspex/example_group/describe_sent_to.rb +1 -1
- data/lib/nrser/rspex/example_group/describe_setup.rb +1 -0
- data/lib/nrser/rspex/example_group/describe_source_file.rb +1 -1
- data/lib/nrser/rspex/example_group/describe_spec_file.rb +4 -2
- data/lib/nrser/rspex/example_group/describe_when.rb +2 -1
- data/lib/nrser/rspex/example_group/describe_x.rb +5 -5
- data/lib/nrser/rspex/format.rb +0 -15
- data/lib/nrser/sugar/method_missing_forwarder.rb +3 -3
- data/lib/nrser/sys/env/path.rb +2 -28
- data/lib/nrser/types.rb +63 -12
- data/lib/nrser/types/README.md +76 -0
- data/lib/nrser/types/arrays.rb +192 -137
- data/lib/nrser/types/attributes.rb +269 -0
- data/lib/nrser/types/booleans.rb +134 -83
- data/lib/nrser/types/bounded.rb +110 -47
- data/lib/nrser/types/collections.rb +119 -0
- data/lib/nrser/types/combinators.rb +283 -196
- data/lib/nrser/types/doc/display_table.md +66 -0
- data/lib/nrser/types/eqiuvalent.rb +91 -0
- data/lib/nrser/types/errors/check_error.rb +5 -11
- data/lib/nrser/types/errors/from_string_error.rb +3 -3
- data/lib/nrser/types/factory.rb +287 -20
- data/lib/nrser/types/hashes.rb +227 -179
- data/lib/nrser/types/in.rb +73 -36
- data/lib/nrser/types/is.rb +67 -60
- data/lib/nrser/types/is_a.rb +141 -84
- data/lib/nrser/types/labels.rb +45 -16
- data/lib/nrser/types/maybe.rb +6 -3
- data/lib/nrser/types/nil.rb +64 -27
- data/lib/nrser/types/not.rb +92 -34
- data/lib/nrser/types/numbers.rb +224 -169
- data/lib/nrser/types/pairs.rb +113 -89
- data/lib/nrser/types/paths.rb +250 -137
- data/lib/nrser/types/responds.rb +167 -89
- data/lib/nrser/types/selector.rb +234 -0
- data/lib/nrser/types/shape.rb +136 -65
- data/lib/nrser/types/strings.rb +189 -63
- data/lib/nrser/types/symbols.rb +83 -33
- data/lib/nrser/types/top.rb +89 -0
- data/lib/nrser/types/tuples.rb +134 -98
- data/lib/nrser/types/type.rb +617 -505
- data/lib/nrser/types/when.rb +123 -98
- data/lib/nrser/types/where.rb +182 -91
- data/lib/nrser/version.rb +1 -1
- data/spec/lib/nrser/core_ext/pathname/subpath_spec.rb +22 -0
- data/spec/lib/nrser/errors/attr_error_spec.rb +68 -0
- data/spec/lib/nrser/errors/count_error_spec.rb +69 -0
- data/spec/lib/nrser/functions/path/normalize_path_spec.rb +35 -0
- data/spec/lib/nrser/functions/tree/map_tree_spec.rb +74 -96
- data/spec/lib/nrser/functions/tree/transform_spec.rb +11 -11
- data/spec/lib/nrser/labs/config_spec.rb +22 -0
- data/spec/lib/nrser/labs/i8/struct_spec.rb +39 -0
- data/spec/lib/nrser/types/display_spec.rb +50 -0
- data/spec/lib/nrser/types/paths_spec.rb +16 -10
- data/spec/lib/nrser/types/selector_spec.rb +125 -0
- data/spec/spec_helper.rb +4 -5
- metadata +105 -22
- data/lib/nrser/types/any.rb +0 -41
- data/lib/nrser/types/attrs.rb +0 -213
- data/lib/nrser/types/trees.rb +0 -42
data/lib/nrser/props/metadata.rb
CHANGED
@@ -47,14 +47,6 @@ class NRSER::Props::Metadata
|
|
47
47
|
# Class Methods
|
48
48
|
# ======================================================================
|
49
49
|
|
50
|
-
# @todo Document has_metadata? method.
|
51
|
-
#
|
52
|
-
# @param [type] arg_name
|
53
|
-
# @todo Add name param description.
|
54
|
-
#
|
55
|
-
# @return [return_type]
|
56
|
-
# @todo Document return value.
|
57
|
-
#
|
58
50
|
def self.has_metadata? klass
|
59
51
|
klass.instance_variable_defined? VARIABLE_NAME
|
60
52
|
end # .has_metadata?
|
@@ -119,10 +111,10 @@ class NRSER::Props::Metadata
|
|
119
111
|
|
120
112
|
# Get a map of property names to property instances.
|
121
113
|
#
|
122
|
-
# @param [Boolean] only_own
|
114
|
+
# @param [Boolean] only_own
|
123
115
|
# Don't include super-class properties.
|
124
116
|
#
|
125
|
-
# @param [Boolean] only_primary
|
117
|
+
# @param [Boolean] only_primary
|
126
118
|
# Don't include properties that have a {NRSER::Props::Prop#source}.
|
127
119
|
#
|
128
120
|
# @return [Hash{ Symbol => NRSER::Props::Prop }]
|
@@ -151,7 +143,7 @@ class NRSER::Props::Metadata
|
|
151
143
|
# @param [Symbol] name
|
152
144
|
# The name of the property.
|
153
145
|
#
|
154
|
-
# @param [Hash{ Symbol => Object }]
|
146
|
+
# @param [Hash{ Symbol => Object }] opts
|
155
147
|
# Constructor options for {NRSER::Props::Prop}.
|
156
148
|
#
|
157
149
|
# @return [NRSER::Props::Prop]
|
@@ -203,7 +195,7 @@ class NRSER::Props::Metadata
|
|
203
195
|
# Collection of prop values iterable by key/value pairs or by indexed
|
204
196
|
# entries.
|
205
197
|
#
|
206
|
-
# @param [Proc<(NRSER::Props::Prop, VALUE)>]
|
198
|
+
# @param [Proc<(NRSER::Props::Prop, VALUE)>] block
|
207
199
|
# Block that will receive primary prop and value pairs.
|
208
200
|
#
|
209
201
|
# @raise [TypeError]
|
@@ -1,6 +1,9 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
+
# TODO I don't know if this ever worked...? Looks like it was supposed to be
|
5
|
+
# mutable prop'd object support backed by an {NRSER::Stash} instance.
|
6
|
+
|
4
7
|
# Requirements
|
5
8
|
# =======================================================================
|
6
9
|
|
@@ -106,13 +109,13 @@ module NRSER::Props::Mutable::Stash
|
|
106
109
|
# Override {NRSER::Props::InstanceMethods#to_data} to handle non-prop
|
107
110
|
# values in the {NRSER::Stash}.
|
108
111
|
#
|
109
|
-
# @param [Boolean] only_props
|
112
|
+
# @param [Boolean] only_props
|
110
113
|
# When `true` only prop values will be added to the data hash.
|
111
114
|
#
|
112
115
|
# Otherwise, any non-prop keys and vales will be added as well
|
113
116
|
# (default behavior).
|
114
117
|
#
|
115
|
-
# @param
|
118
|
+
# @param [Hash] kwds
|
116
119
|
# See {NRSER::Props::InstanceMethods#to_data}.
|
117
120
|
#
|
118
121
|
# @return (see NRSER::Props::InstanceMethods#to_data)
|
data/lib/nrser/props/prop.rb
CHANGED
@@ -120,13 +120,13 @@ class Prop
|
|
120
120
|
# `.prop` "macro" defined at {NRSER::Props::Props::ClassMethods#prop}
|
121
121
|
# that is extended in to classes including {NRSER::Props::Props}.
|
122
122
|
#
|
123
|
-
# @param [nil | Proc | Object] default
|
123
|
+
# @param [nil | Proc | Object] default
|
124
124
|
# A default value or a {Proc} used to get default values for *primary*
|
125
125
|
# props. *Dervied* props (those that have a {#source}) may not
|
126
126
|
#
|
127
127
|
# At least one of `default:` and `source:` must be `nil`.
|
128
128
|
#
|
129
|
-
# @param [nil | Symbol | String | Proc] source
|
129
|
+
# @param [nil | Symbol | String | Proc] source
|
130
130
|
# Source that provides the prop's value. See details for how each type is
|
131
131
|
# handled in {#source}. Strings are converted to symbols.
|
132
132
|
#
|
@@ -390,13 +390,9 @@ class Prop
|
|
390
390
|
end # #full_name
|
391
391
|
|
392
392
|
|
393
|
-
# Test if this prop is configured to provide default values
|
393
|
+
# Test if this prop is configured to provide default values.
|
394
394
|
#
|
395
|
-
# @
|
396
|
-
# @todo Add name param description.
|
397
|
-
#
|
398
|
-
# @return [return_type]
|
399
|
-
# @todo Document return value.
|
395
|
+
# @return [Boolean]
|
400
396
|
#
|
401
397
|
def has_default?
|
402
398
|
@has_default
|
@@ -451,26 +447,21 @@ class Prop
|
|
451
447
|
end # #source?
|
452
448
|
|
453
449
|
|
454
|
-
#
|
455
|
-
#
|
456
|
-
# @param [type] arg_name
|
457
|
-
# @todo Add name param description.
|
450
|
+
# Is the value of this prop coming from an instance variable?
|
458
451
|
#
|
459
|
-
# @return [
|
460
|
-
# @todo Document return value.
|
452
|
+
# @return [Boolean]
|
461
453
|
#
|
462
454
|
def instance_variable_source?
|
463
455
|
@instance_variable_source
|
464
456
|
end # #instance_variable_source?
|
465
457
|
|
466
458
|
|
467
|
-
#
|
459
|
+
# Does this property represent and independent value (**not** sourced)?
|
468
460
|
#
|
469
|
-
#
|
470
|
-
#
|
461
|
+
# Primary properties are important because they're the ones you need to
|
462
|
+
# store and transport to reconstruct the instance.
|
471
463
|
#
|
472
|
-
# @return [
|
473
|
-
# @todo Document return value.
|
464
|
+
# @return [Boolean]
|
474
465
|
#
|
475
466
|
def primary?
|
476
467
|
!source?
|
data/lib/nrser/rspex.rb
CHANGED
@@ -44,10 +44,7 @@ using NRSER
|
|
44
44
|
|
45
45
|
# Merge "expectation" hashes by appending all clauses for each state.
|
46
46
|
#
|
47
|
-
# @
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# @param [Array<Hash>] *expectations
|
47
|
+
# @param [Array<Hash>] expectations
|
51
48
|
# Splat of "expectation" hashes - see the examples.
|
52
49
|
#
|
53
50
|
def merge_expectations *expectations
|
@@ -152,27 +149,11 @@ module NRSER::RSpex
|
|
152
149
|
# =====================================================================
|
153
150
|
|
154
151
|
|
155
|
-
# @todo Document short_s method.
|
156
|
-
#
|
157
|
-
# @param [type] arg_name
|
158
|
-
# @todo Add name param description.
|
159
|
-
#
|
160
|
-
# @return [return_type]
|
161
|
-
# @todo Document return value.
|
162
|
-
#
|
163
152
|
def self.short_s value, max = 64
|
164
153
|
NRSER.smart_ellipsis value.inspect, max
|
165
154
|
end # .short_s
|
166
155
|
|
167
156
|
|
168
|
-
# @todo Document format method.
|
169
|
-
#
|
170
|
-
# @param [type] arg_name
|
171
|
-
# @todo Add name param description.
|
172
|
-
#
|
173
|
-
# @return [return_type]
|
174
|
-
# @todo Document return value.
|
175
|
-
#
|
176
157
|
def self.format *args
|
177
158
|
NRSER::RSpex::Format.description *args
|
178
159
|
end # .format
|
@@ -15,10 +15,10 @@ module NRSER::RSpex::ExampleGroup
|
|
15
15
|
# end
|
16
16
|
# end
|
17
17
|
#
|
18
|
-
# @param [Array]
|
18
|
+
# @param [Array] args
|
19
19
|
# Arguments to call `subject` with to produce the new subject.
|
20
20
|
#
|
21
|
-
# @param [#call]
|
21
|
+
# @param [#call] body
|
22
22
|
# Block to execute in the context of the example group after refining
|
23
23
|
# the subject.
|
24
24
|
#
|
@@ -33,11 +33,14 @@ module NRSER::RSpex::ExampleGroup
|
|
33
33
|
|
34
34
|
# Short / old name
|
35
35
|
alias_method :called_with, :describe_called_with
|
36
|
+
|
37
|
+
# New / bold name
|
38
|
+
alias_method :CALLED_WITH, :describe_called_with
|
36
39
|
|
37
40
|
|
38
41
|
# Version of {#describe_called_with} for when you have no arguments.
|
39
42
|
#
|
40
|
-
# @param [#call]
|
43
|
+
# @param [#call] body
|
41
44
|
# Block to execute in the context of the example group after refining
|
42
45
|
# the subject.
|
43
46
|
#
|
@@ -52,7 +55,9 @@ module NRSER::RSpex::ExampleGroup
|
|
52
55
|
|
53
56
|
alias_method :called, :describe_called
|
54
57
|
alias_method :when_called, :describe_called
|
55
|
-
|
58
|
+
|
59
|
+
# new / bold name
|
60
|
+
alias_method :CALLED, :describe_called
|
56
61
|
|
57
62
|
|
58
63
|
end # module NRSER::RSpex::ExampleGroup
|
@@ -8,7 +8,7 @@ module NRSER::RSpex::ExampleGroup
|
|
8
8
|
#
|
9
9
|
# @param *description (see #describe_x)
|
10
10
|
#
|
11
|
-
# @param [Hash<Symbol, Object>]
|
11
|
+
# @param [Hash<Symbol, Object>] metadata
|
12
12
|
# RSpec metadata to set for the example group.
|
13
13
|
#
|
14
14
|
# See the `metadata` keyword argument to {#describe_x}.
|
@@ -5,7 +5,7 @@ module NRSER::RSpex::ExampleGroup
|
|
5
5
|
# Describe an instance of the described class by providing arguments for
|
6
6
|
# it's construction.
|
7
7
|
#
|
8
|
-
# @param [Array]
|
8
|
+
# @param [Array] constructor_args
|
9
9
|
# Arguments to pass to `.new` on {#described_class} to create instances.
|
10
10
|
#
|
11
11
|
# @return [void]
|
@@ -21,5 +21,7 @@ module NRSER::RSpex::ExampleGroup
|
|
21
21
|
},
|
22
22
|
&body
|
23
23
|
end # #describe_instance
|
24
|
+
|
25
|
+
alias_method :INSTANCE, :describe_instance
|
24
26
|
|
25
27
|
end # module NRSER::RSpex::ExampleGroup
|
@@ -5,44 +5,75 @@ module NRSER::RSpex::ExampleGroup
|
|
5
5
|
|
6
6
|
# Describe a method of the parent subject.
|
7
7
|
#
|
8
|
+
# @param [Method | Symbol | String] method
|
9
|
+
# The method being described:
|
10
|
+
#
|
11
|
+
# 1. {Method} instance - used directly.
|
12
|
+
#
|
13
|
+
# 2. {Symbol}, {String} -
|
14
|
+
#
|
8
15
|
# @return [void]
|
9
16
|
#
|
10
|
-
def describe_method
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
else
|
23
|
-
'.'
|
24
|
-
end
|
17
|
+
def describe_method method,
|
18
|
+
*description,
|
19
|
+
bind_subject: nil,
|
20
|
+
**metadata,
|
21
|
+
&body
|
22
|
+
case method
|
23
|
+
when Method
|
24
|
+
method_name = method.name
|
25
|
+
subject_block = -> { method }
|
26
|
+
bind_subject = true
|
27
|
+
name_string = NRSER::RSpex::Format.md_code_quote \
|
28
|
+
"#{ method.receiver }.#{ method.name }"
|
25
29
|
|
26
|
-
|
27
|
-
|
28
|
-
|
30
|
+
when Symbol, String
|
31
|
+
method_name = method
|
32
|
+
|
33
|
+
# Due to legacy, we only auto-bind if the name is a symbol
|
34
|
+
#
|
35
|
+
# TODO Get rid of this
|
36
|
+
#
|
37
|
+
bind_subject = method_name.is_a?( Symbol ) if bind_subject.nil?
|
38
|
+
|
39
|
+
subject_block = if bind_subject
|
40
|
+
-> { super().method method_name }
|
41
|
+
end
|
42
|
+
|
43
|
+
name_prefix = if self.respond_to?( :metadata ) &&
|
44
|
+
self.metadata.key?( :constructor_args )
|
45
|
+
'#'
|
29
46
|
else
|
30
|
-
|
47
|
+
'.'
|
31
48
|
end
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
49
|
+
|
50
|
+
method = if self.try( :metadata )
|
51
|
+
getter = if self.metadata.key?( :constructor_args )
|
52
|
+
:instance_method
|
53
|
+
else
|
54
|
+
:method
|
55
|
+
end
|
56
|
+
|
57
|
+
target = self.metadata[:class] || self.metadata[:module]
|
58
|
+
|
59
|
+
if target
|
60
|
+
begin
|
61
|
+
target.public_send getter, method_name
|
62
|
+
rescue
|
63
|
+
nil
|
64
|
+
end
|
40
65
|
end
|
41
66
|
end
|
42
|
-
end
|
43
67
|
|
44
|
-
|
45
|
-
|
68
|
+
name_string = NRSER::RSpex::Format.md_code_quote \
|
69
|
+
"#{ name_prefix }#{ method_name }"
|
70
|
+
|
71
|
+
else
|
72
|
+
raise NRSER::TypeError.new \
|
73
|
+
"Expected Method, Symbol or String for `method_name`, found",
|
74
|
+
method_name
|
75
|
+
|
76
|
+
end # case method_arg
|
46
77
|
|
47
78
|
# Create the RSpec example group context
|
48
79
|
describe_x \
|
@@ -54,8 +85,11 @@ module NRSER::RSpex::ExampleGroup
|
|
54
85
|
**metadata,
|
55
86
|
method_name: method_name,
|
56
87
|
},
|
88
|
+
bind_subject: bind_subject,
|
57
89
|
subject_block: subject_block,
|
58
90
|
&body
|
59
91
|
end # #describe_method
|
92
|
+
|
93
|
+
alias_method :METHOD, :describe_method
|
60
94
|
|
61
95
|
end # module NRSER::RSpex::ExampleGroup
|
@@ -8,7 +8,7 @@ module NRSER::RSpex::ExampleGroup
|
|
8
8
|
# Pretty much a short-cut for nesting {#describe_method} /
|
9
9
|
# {#describe_called_with}. Meh.
|
10
10
|
#
|
11
|
-
# @param [Array]
|
11
|
+
# @param [Array] args
|
12
12
|
# Passed to {NRSER::Message.from} to get or create the message instance.
|
13
13
|
#
|
14
14
|
# @param &body (see #describe_x)
|
@@ -14,7 +14,7 @@ module NRSER::RSpex::ExampleGroup
|
|
14
14
|
#
|
15
15
|
# @param *description (see #describe_x)
|
16
16
|
#
|
17
|
-
# @param [Hash<Symbol, Object>]
|
17
|
+
# @param [Hash<Symbol, Object>] metadata
|
18
18
|
# RSpec metadata to set for the example group.
|
19
19
|
#
|
20
20
|
# See the `metadata` keyword argument to {#describe_x}.
|
@@ -34,5 +34,8 @@ module NRSER::RSpex::ExampleGroup
|
|
34
34
|
|
35
35
|
# Old name
|
36
36
|
alias_method :describe_topic, :describe_section
|
37
|
+
|
38
|
+
# BOLD NAME!
|
39
|
+
alias_method :SECTION, :describe_section
|
37
40
|
|
38
41
|
end # module NRSER::RSpex::ExampleGroup
|
@@ -13,7 +13,7 @@ module NRSER::RSpex::ExampleGroup
|
|
13
13
|
# If it's a {Wrapper} it will be unwrapped in example contexts of the
|
14
14
|
# new example group.
|
15
15
|
#
|
16
|
-
# @param [Boolean] publicly
|
16
|
+
# @param [Boolean] publicly
|
17
17
|
# Send message publicly via {Object#public_send} (default) or privately
|
18
18
|
# via {Object.send}.
|
19
19
|
#
|