Skip to content

Allow builder DSL to accept implicit arrays and hashes #6

Allow builder DSL to accept implicit arrays and hashes

Allow builder DSL to accept implicit arrays and hashes #6

GitHub Actions / Rspec Tests - 3.0 failed Feb 15, 2024 in 1s

12 passed, 2 failed and 0 skipped

Tests failed

❌ test_results/rspec.xml

14 tests were completed in 16ms with 12 passed, 2 failed and 0 skipped.

Test suite Passed Failed Skipped Time
rspec 12✅ 2❌ 16ms

❌ rspec

spec.unit.keyword_builder_spec
  ✅ KeywordBuilder with a simple struct builds a record with the builder
  ✅ KeywordBuilder with a simple struct builds a record combining arguments
  ✅ KeywordBuilder with a simple struct constructs an array when builder is given more than one argument
  ✅ KeywordBuilder with a simple struct constructs an array when builder is given arguments and a block
  ✅ KeywordBuilder with a simple struct constructs an hash when builder is given keyword arguments
  ✅ KeywordBuilder with a simple struct rejects arguments colliding with builder
  ✅ KeywordBuilder with a simple struct rejects repeated arguments
  ✅ KeywordBuilder with a simple struct requires an argument
  ❌ KeywordBuilder with a simple struct rejects mixed keyword and positional arguments
	Failure/Error:
  ❌ KeywordBuilder with a simple struct rejects mixed keyword and block arguments
	Failure/Error:
  ✅ KeywordBuilder with a simple struct rejects unknown arguments
  ✅ KeywordBuilder with a simple struct marks non-wildcard builders
  ✅ KeywordBuilder with a simple struct with wildcard arguments marks wildcard builders
  ✅ KeywordBuilder with a simple struct with wildcard arguments passes wildcard arguments

Annotations

Check failure on line 0 in test_results/rspec.xml

See this annotation in the file changed.

@github-actions github-actions / Rspec Tests - 3.0

rspec ► spec.unit.keyword_builder_spec ► KeywordBuilder with a simple struct rejects mixed keyword and positional arguments

Failed test found in:
  test_results/rspec.xml
Error:
  Failure/Error:
Raw output
Failure/Error:
  expect {
    builder.build!(a: 1, b: 2) { c(3, x: 4) }
  }.to raise_error(ArgumentError, /Invalid arguments/)

  expected ArgumentError with message matching /Invalid arguments/ but nothing was raised
./spec/unit/keyword_builder_spec.rb:85:in `block (3 levels) in <top (required)>'

Check failure on line 0 in test_results/rspec.xml

See this annotation in the file changed.

@github-actions github-actions / Rspec Tests - 3.0

rspec ► spec.unit.keyword_builder_spec ► KeywordBuilder with a simple struct rejects mixed keyword and block arguments

Failed test found in:
  test_results/rspec.xml
Error:
  Failure/Error:
Raw output
Failure/Error:
  expect {
    builder.build!(a: 1, b: 2) { c(x: 3) { 4 } }
  }.to raise_error(ArgumentError, /Invalid arguments/)

  expected ArgumentError with message matching /Invalid arguments/ but nothing was raised
./spec/unit/keyword_builder_spec.rb:91:in `block (3 levels) in <top (required)>'