Module: AssertGenerator
- Defined in:
- lib/assert_generator.rb,
lib/assert_generator/version.rb
Defined Under Namespace
Classes: Klass
Constant Summary collapse
- VERSION =
'0.1.1'
Class Method Summary collapse
-
.generate_asserts(source = nil, source_expr = nil, relative_dates: nil, &block) ⇒ Object
Generate asserts based on some actual output from an object under test Outputs executable code to stdout with the assert statements, which can be pasted into the test The user needs to ensure that values are deterministic and do not change between test invocations.
Class Method Details
.generate_asserts(source, source_expr) ⇒ Object .generate_asserts({ block }) { ... } ⇒ Object
Generate asserts based on some actual output from an object under test Outputs executable code to stdout with the assert statements, which can be pasted into the test The user needs to ensure that values are deterministic and do not change between test invocations
24 25 26 |
# File 'lib/assert_generator.rb', line 24 def self.generate_asserts(source = nil, source_expr = nil, relative_dates: nil, &block) AssertGenerator::Klass.new.send(:generate_asserts, source, source_expr, relative_dates, block) end |