require 'spec_helper' describe Diagnostics do describe '.checks' do it 'defaults to an empty array' do described_class.checks.should eq([]) end end end describe DiagnosticsCheck do describe '.included' do before { diagnostic_checks.should be_empty } it 'adds the class to checks' do class MyCheck; include DiagnosticsCheck end diagnostic_checks.should have(1).check end end end