rspec 检查类别方法 Posted on 2011-07-28 In rspec rspec 检查类别方法 target.should be_a_kind_of(Array) # target.class.should == Array target.should be_an_instance_of(Array) # target.class.should == Array target.should response_to(:foo) # target.response_to?(:foo).should == true