Stubbing in model for mash tournaments

This commit is contained in:
Dan Buch 2012-03-09 08:06:25 -05:00
parent cc0cd9e8cd
commit e9930da9f1
4 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,2 @@
class MashTournament < ActiveRecord::Base
end

View File

@ -0,0 +1,13 @@
class CreateMashTournaments < ActiveRecord::Migration
def self.up
create_table :mash_tournaments do |t|
t.integer :requester_id
t.timestamps
end
end
def self.down
drop_table :mash_tournaments
end
end

View File

@ -0,0 +1,7 @@
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
requester_id: 1
two:
requester_id: 1

View File

@ -0,0 +1,13 @@
require 'spec_helper'
describe MashTournament do
before(:each) do
@valid_attributes = {
:requester_id => 1
}
end
it "should create a new instance given valid attributes" do
MashTournament.create!(@valid_attributes)
end
end