Skip to content

Instantly share code, notes, and snippets.

@KensoDev
Created May 1, 2012 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KensoDev/2566281 to your computer and use it in GitHub Desktop.
Save KensoDev/2566281 to your computer and use it in GitHub Desktop.
describe :git_sha do
it "should read the file correctly" do
controller.stub!(:current_user).and_return(nil)
File.should_receive(:open).with("#{Rails.root}/REVISION").and_return(stub(read: "aaa"))
get :git_sha
response.body.should == "aaa"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment