From 2b34516aa8401122ca3e33e617650cee326c7ab2 Mon Sep 17 00:00:00 2001 From: Ricky Barrette Date: Wed, 25 Apr 2012 12:39:44 -0400 Subject: [PATCH] Added Maps model refs #16 This model will be used for storing information about each map --- app/models/map.rb | 3 +++ db/migrate/001_create_maps.rb | 13 +++++++++++++ test/fixtures/maps.yml | 11 +++++++++++ test/unit/map_test.rb | 10 ++++++++++ 4 files changed, 37 insertions(+) create mode 100644 app/models/map.rb create mode 100644 db/migrate/001_create_maps.rb create mode 100644 test/fixtures/maps.yml create mode 100644 test/unit/map_test.rb diff --git a/app/models/map.rb b/app/models/map.rb new file mode 100644 index 0000000..62e00d7 --- /dev/null +++ b/app/models/map.rb @@ -0,0 +1,3 @@ +class Map < ActiveRecord::Base + unloadable +end diff --git a/db/migrate/001_create_maps.rb b/db/migrate/001_create_maps.rb new file mode 100644 index 0000000..8759636 --- /dev/null +++ b/db/migrate/001_create_maps.rb @@ -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 diff --git a/test/fixtures/maps.yml b/test/fixtures/maps.yml new file mode 100644 index 0000000..88b296d --- /dev/null +++ b/test/fixtures/maps.yml @@ -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 diff --git a/test/unit/map_test.rb b/test/unit/map_test.rb new file mode 100644 index 0000000..fe4a6d4 --- /dev/null +++ b/test/unit/map_test.rb @@ -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