我的模型有
def self.empty_building
// stuff
end
我怎样才能为这个现有的 rspec?,尝试过:
describe "empty_building" do
subject { Building.new }
it { should respond_to :empty_building }
end
but getting :
Failure/Error: it { should respond_to :empty_building }
expected #<Building id: nil, district_id: nil, name: nil,
direct: nil, created_at: nil, updated_at: nil> to respond to :empty_building