spec for rules.rb