Skip to content

Instantly share code, notes, and snippets.

@farrelley
Created November 29, 2012 20:35
Show Gist options
  • Save farrelley/4171731 to your computer and use it in GitHub Desktop.
Save farrelley/4171731 to your computer and use it in GitHub Desktop.
I was trying to just write a rspec for the Clat model.
method self.active
def self.active
Clat.expire_clats
where(:active => true)
end
this is what i was doing in rspec
it "returns active clats" do
clat = Clat.new
clat.stub(:expire_clats).returns(true)
clat.active.should == []
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment