Refactor spec/trema_spec.rb