Skip to content

Instantly share code, notes, and snippets.

@mjfreshyfresh
Created June 24, 2009 22:08
Show Gist options
  • Save mjfreshyfresh/135544 to your computer and use it in GitHub Desktop.
Save mjfreshyfresh/135544 to your computer and use it in GitHub Desktop.
ENV['SAILS_ENV'] = 'mj_dev'
require 'spec'
require File.expand_path(File.dirname(__FILE__)) + '/../../config/boot.rb'
describe 'Rivalry' do
it "should instantiate a rivalry from two rivals" do
puts "run test"
rivals = [
mock(Rival, :title => 'Rival A', :rivalry_id => nil), mock(Rival, :title => 'Rival B', :rivalry_id => nil)
]
Rival.should_receive(:rivalry_id).and_return(1)
# Rival.should_receive(:save).and_return(mock(Rival))
# Rivalry.should_receive(:save).and_return(mock(Rivalry))
# Rivalry.create_from_rivals!(rivals, 0)
end
it "should return 100"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment