require_relative '../lib/kattr' class Dog extend KAttr kattr_reader :teeth kattr_writer :eye_color kattr_accessor :size def self.teeth "sharp" end def self.eye_color @@eye_color end end describe Dog do context 'with KAttr' do it 'has sharp teeth' do Dog.teeth.should eq 'sharp' end it 'has lovely green eyes' do Dog.eye_color = 'green' Dog.eye_color.should eq 'green' end it 'is bloody humongous!' do Dog.size = 'huge' Dog.size.should eq 'huge' end end end