Adding tests for rule.rb