Skip to content

Instantly share code, notes, and snippets.

@fdutey
Created June 15, 2012 21:48
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 fdutey/2938865 to your computer and use it in GitHub Desktop.
Save fdutey/2938865 to your computer and use it in GitHub Desktop.
describe :note_for do
it 'give notes for the project' do
CategoryProject.create(:project => project,
:category => category,
:description => 'test')
params = { :category => category }
project.notes.create params.merge(:value => 8)
2.times{ project.notes.create params.merge(:value => 3) }
project.note_for(category).should == 4.7
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment