Module: SuperDiff::RSpec
- Defined in:
- lib/super_diff/rspec.rb,
lib/super_diff/rspec/differ.rb,
lib/super_diff/rspec/differs.rb,
lib/super_diff/rspec/configuration.rb,
lib/super_diff/rspec/augmented_matcher.rb,
lib/super_diff/rspec/object_inspection.rb,
lib/super_diff/rspec/matcher_text_builders.rb,
lib/super_diff/rspec/matcher_text_template.rb,
lib/super_diff/rspec/differs/hash_including.rb,
lib/super_diff/rspec/operational_sequencers.rb,
lib/super_diff/rspec/matcher_text_builders/base.rb,
lib/super_diff/rspec/matcher_text_builders/match.rb,
lib/super_diff/rspec/differs/collection_including.rb,
lib/super_diff/rspec/object_inspection/inspectors.rb,
lib/super_diff/rspec/object_inspection/map_extension.rb,
lib/super_diff/rspec/differs/object_having_attributes.rb,
lib/super_diff/rspec/matcher_text_builders/respond_to.rb,
lib/super_diff/rspec/matcher_text_builders/raise_error.rb,
lib/super_diff/rspec/matcher_text_builders/be_predicate.rb,
lib/super_diff/rspec/matcher_text_builders/have_predicate.rb,
lib/super_diff/rspec/differs/collection_containing_exactly.rb,
lib/super_diff/rspec/matcher_text_builders/contain_exactly.rb,
lib/super_diff/rspec/operational_sequencers/hash_including.rb,
lib/super_diff/rspec/object_inspection/inspectors/hash_including.rb,
lib/super_diff/rspec/operational_sequencers/collection_including.rb,
lib/super_diff/rspec/operational_sequencers/object_having_attributes.rb,
lib/super_diff/rspec/object_inspection/inspectors/collection_including.rb,
lib/super_diff/rspec/operational_sequencers/collection_containing_exactly.rb,
lib/super_diff/rspec/object_inspection/inspectors/object_having_attributes.rb,
lib/super_diff/rspec/object_inspection/inspectors/collection_containing_exactly.rb
Defined Under Namespace
Modules: AugmentedMatcher, Differs, MatcherTextBuilders, ObjectInspection, OperationalSequencers
Classes: Configuration, Differ, MatcherTextTemplate
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
Returns the value of attribute extra_diff_formatter_classes.
17
18
19
|
# File 'lib/super_diff/rspec.rb', line 17
def
@extra_diff_formatter_classes
end
|
Returns the value of attribute extra_differ_classes.
15
16
17
|
# File 'lib/super_diff/rspec.rb', line 15
def
@extra_differ_classes
end
|
Returns the value of attribute extra_operational_sequencer_classes.
16
17
18
|
# File 'lib/super_diff/rspec.rb', line 16
def
@extra_operational_sequencer_classes
end
|
Class Method Details
.a_collection_containing_exactly_something?(value) ⇒ Boolean
46
47
48
49
|
# File 'lib/super_diff/rspec.rb', line 46
def self.a_collection_containing_exactly_something?(value)
fuzzy_object?(value) &&
value.base_matcher.is_a?(::RSpec::Matchers::BuiltIn::ContainExactly)
end
|
.a_collection_including_something?(value) ⇒ Boolean
35
36
37
38
39
|
# File 'lib/super_diff/rspec.rb', line 35
def self.a_collection_including_something?(value)
fuzzy_object?(value) &&
value.respond_to?(:expecteds) &&
!(value.expecteds.one? && value.expecteds.first.is_a?(::Hash))
end
|
.a_hash_including_something?(value) ⇒ Boolean
28
29
30
31
32
33
|
# File 'lib/super_diff/rspec.rb', line 28
def self.a_hash_including_something?(value)
fuzzy_object?(value) &&
value.respond_to?(:expecteds) &&
value.expecteds.one? &&
value.expecteds.first.is_a?(::Hash)
end
|
.an_object_having_some_attributes?(value) ⇒ Boolean
41
42
43
44
|
# File 'lib/super_diff/rspec.rb', line 41
def self.an_object_having_some_attributes?(value)
fuzzy_object?(value) &&
value.base_matcher.is_a?(::RSpec::Matchers::BuiltIn::HaveAttributes)
end
|
.configuration ⇒ Object
24
25
26
|
# File 'lib/super_diff/rspec.rb', line 24
def self.configuration
@_configuration ||= Configuration.new
end
|
20
21
22
|
# File 'lib/super_diff/rspec.rb', line 20
def self.configure
yield configuration
end
|
.fuzzy_object?(value) ⇒ Boolean
51
52
53
|
# File 'lib/super_diff/rspec.rb', line 51
def self.fuzzy_object?(value)
value.is_a?(::RSpec::Matchers::AliasedMatcher)
end
|