You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruleby
Hi!
Are there any best practices on how to test ruleby rulebooks with
rspec? I want to test if a rule correctly calls a method when it's
conditions are fulfilled.
The code in the github-repo is tested by asserting a Success-Object to
the fact base. This code is called inside the rulebook. But this is
code that would be called when I used the rulebook in production. The
Success-Class is created in spec_helper.rb. This code will not be
available in a production environment.
Is there any way to test this without creating Success-Objects? I feel
that's a very hacky way to test the execution of a rule. Is there any
better way?