Stubbing in model for mash tournaments

cat-town
Dan Buch 13 years ago
parent cc0cd9e8cd
commit e9930da9f1

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

@ -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

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

@ -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
Loading…
Cancel
Save