require_relative '../lib/kattr' describe Class do before do class Dog cattr_reader :teeth cattr_writer :eye_color cattr_accessor :hair_color def self.teeth "sharp" end def self.eye_color @@eye_color end end end it 'cattr_reader' do Dog.teeth.should eq("sharp") end it 'cattr_writer' do Dog.eye_color = "green" Dog.eye_color.should eq("green") end it 'cattr_accessor' do Dog.hair_color = 'grey' Dog.hair_color.should eq("grey") end end