Skip to content

Commit

Permalink
Add include Dry::Monads[:result] to Rspec blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
cllns committed Jul 16, 2024
1 parent a54ba77 commit 26a286c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/hanami/rspec/generators/support_rspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,7 @@
# related to randomization by passing the same `--seed` value as the one that
# triggered the failure.
Kernel.srand config.seed

# This allows you to use Success(..) and Failure(..) for dry-operation results
config.include Dry::Monads[:result]
end
3 changes: 3 additions & 0 deletions spec/unit/hanami/rspec/commands/install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@
# related to randomization by passing the same `--seed` value as the one that
# triggered the failure.
Kernel.srand config.seed
# This allows you to use Success(..) and Failure(..) for dry-operation results
config.include Dry::Monads[:result]
end
EOF
expect(fs.read("spec/support/rspec.rb")).to eq(support_rspec)
Expand Down

0 comments on commit 26a286c

Please sign in to comment.