Added Maps model
refs #16 This model will be used for storing information about each map
This commit is contained in:
3
app/models/map.rb
Normal file
3
app/models/map.rb
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
class Map < ActiveRecord::Base
|
||||||
|
unloadable
|
||||||
|
end
|
||||||
13
db/migrate/001_create_maps.rb
Normal file
13
db/migrate/001_create_maps.rb
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
class CreateMaps < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
create_table :maps do |t|
|
||||||
|
t.column :package, :string
|
||||||
|
t.column :build, :string
|
||||||
|
t.column :map, :string
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
drop_table :maps
|
||||||
|
end
|
||||||
|
end
|
||||||
11
test/fixtures/maps.yml
vendored
Normal file
11
test/fixtures/maps.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||||
|
one:
|
||||||
|
id: 1
|
||||||
|
package: MyString
|
||||||
|
build: MyString
|
||||||
|
map: MyString
|
||||||
|
two:
|
||||||
|
id: 2
|
||||||
|
package: MyString
|
||||||
|
build: MyString
|
||||||
|
map: MyString
|
||||||
10
test/unit/map_test.rb
Normal file
10
test/unit/map_test.rb
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
require File.dirname(__FILE__) + '/../test_helper'
|
||||||
|
|
||||||
|
class MapTest < ActiveSupport::TestCase
|
||||||
|
fixtures :maps
|
||||||
|
|
||||||
|
# Replace this with your real tests.
|
||||||
|
def test_truth
|
||||||
|
assert true
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user