diff --git a/app/models/dts.rb b/app/models/dts.rb new file mode 100644 index 000000000..3a9dcbcfb --- /dev/null +++ b/app/models/dts.rb @@ -0,0 +1,5 @@ +class Dts < ActiveRecord::Base + attr_accessible :Category, :Defect, :Description, :File, :IPLine, :IPLineCode, :Method, :Num, :PreConditions, :Review, :StartLine, :TraceInfo, :Variable, :project_id + + belongs_to :project +end diff --git a/db/migrate/20150719092427_create_dts.rb b/db/migrate/20150719092427_create_dts.rb new file mode 100644 index 000000000..36ff24756 --- /dev/null +++ b/db/migrate/20150719092427_create_dts.rb @@ -0,0 +1,22 @@ +class CreateDts < ActiveRecord::Migration + def change + create_table :dts do |t| + t.string :IPLineCode + t.string :Description + t.string :Num + t.string :Variable + t.string :TraceInfo + t.string :Method + t.string :File + t.string :IPLine + t.string :Review + t.string :Category + t.string :Defect + t.string :PreConditions + t.string :StartLine + t.integer :project_id + + t.timestamps + end + end +end diff --git a/spec/factories/dts.rb b/spec/factories/dts.rb new file mode 100644 index 000000000..05e6148c2 --- /dev/null +++ b/spec/factories/dts.rb @@ -0,0 +1,19 @@ +FactoryGirl.define do + factory :dt, :class => 'Dts' do + IPLineCode "MyString" +Description "MyString" +Num "MyString" +Variable "MyString" +TraceInfo "MyString" +Method "MyString" +File "MyString" +IPLine "MyString" +Review "MyString" +Category "MyString" +Defect "MyString" +PreConditions "MyString" +StartLine "MyString" +project_id 1 + end + +end diff --git a/spec/models/dts_spec.rb b/spec/models/dts_spec.rb new file mode 100644 index 000000000..5c274cba4 --- /dev/null +++ b/spec/models/dts_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe Dts, :type => :model do + pending "add some examples to (or delete) #{__FILE__}" +end