Created
December 1, 2011 17:29
-
-
Save metacritical/1418398 to your computer and use it in GitHub Desktop.
Just A mock file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe "Mock User object" do | |
let(:user) do | |
mock_model User, :find => "pankaj" | |
end | |
it "Should validate" do | |
#@user = User.find(1) | |
#User.find(:all) | |
user.find.should eq("pankaj") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment