spec/spec_helper.rb
# Create a systematic report with a form with 3 fields, 1 canonical document, 1 search, 1 record
# and 2 positive resolutions for document 1
Create a systematic report with a form with 3 fields, 1 canonical document, 1 search, 1 record
and 2 positive resolutions for document 1
Create a systematic report with a form with 3 fields 1 canonical document 1 search 1 record and 2 positive resolutions for document 1
def sr_for_report
    create_sr
    sr1=SystematicReview[1]
    sr1.stage='report'
    SrField.insert(:id=>1, :systematic_review_id=>1, :order=>1, :name=>"field_1", :description=>"Field 1", :type=>"textarea")
    SrField.insert(:id=>2, :systematic_review_id=>1, :order=>2, :name=>"field_2", :description=>"Field 2", :type=>"select", :options=>"a=a;b=b")
    SrField.insert(:id=>3, :systematic_review_id=>1, :order=>3, :name=>"field_3", :description=>"Field 3", :type=>"multiple", :options=>"a=a;b=b")
    SrField.update_table(sr1)
    CanonicalDocument.insert(:id=>1, :title=>"Title 1", :year=>0)
    create_search
    create_record(:cd_id=>1, :search_id=>1)
    $db[:analysis_sr_1].insert(:user_id=>1, :canonical_document_id=>1, :field_1=>"[campo1] [campo2]", :field_2=>"a",:field_3=>"a,b")
    Resolution.insert(:systematic_review_id=>1, :canonical_document_id=>1, :user_id=>1, :stage=>'screening_title_abstract', :resolution=>'yes')
    Resolution.insert(:systematic_review_id=>1, :canonical_document_id=>1, :user_id=>1, :stage=>'review_full_text', :resolution=>'yes')
    sr1
  end
def sr_for_report create_sr sr1 = SystematicReview [ 1 ] sr1 . stage = 'report' SrField . insert ( :id => 1 , :systematic_review_id => 1 , :order => 1 , :name => "field_1" , :description => "Field 1" , :type => "textarea" ) SrField . insert ( :id => 2 , :systematic_review_id => 1 , :order => 2 , :name => "field_2" , :description => "Field 2" , :type => "select" , :options => "a=a;b=b" ) SrField . insert ( :id => 3 , :systematic_review_id => 1 , :order => 3 , :name => "field_3" , :description => "Field 3" , :type => "multiple" , :options => "a=a;b=b" ) SrField . update_table ( sr1 ) CanonicalDocument . insert ( :id => 1 , :title => "Title 1" , :year => 0 ) create_search create_record ( :cd_id => 1 , :search_id => 1 ) $db [ :analysis_sr_1 ] . insert ( :user_id => 1 , :canonical_document_id => 1 , :field_1 => "[campo1] [campo2]" , :field_2 => "a" , :field_3 => "a,b" ) Resolution . insert ( :systematic_review_id => 1 , :canonical_document_id => 1 , :user_id => 1 , :stage => 'screening_title_abstract' , :resolution => 'yes' ) Resolution . insert ( :systematic_review_id => 1 , :canonical_document_id => 1 , :user_id => 1 , :stage => 'review_full_text' , :resolution => 'yes' ) sr1 end
Create a systematic report with a form with 3 fields, 1 canonical document, 1 search, 1 record
and 2 positive resolutions for document 1
Create a systematic report with a form with 3 fields 1 canonical document 1 search 1 record and 2 positive resolutions for document 1