Sha256: 6a5d832cf31aac9bdfa5f5d1df17257248a28f11b405893cac384d31fa964860

Contents?: true

Size: 948 Bytes

Versions: 6

Compression:

Stored size: 948 Bytes

Contents

def clean_data_inspector_migration
  Dir.chdir("#{Rails.root}") do
    system "rake db:rollback"
    system "rake data_sanity:db:rollback"
  end
end

def setup_sample_app
  Dir.chdir("#{Rails.root}") do
    system "bundle"
    system "rake db:reset"
  end
end

def setup_data_inspector
  Dir.chdir("#{Rails.root}") do
    system "rake data_sanity:db:migrate"
  end
end

def setup_data_sanity_criteria
  Dir.chdir("#{Rails.root}") do
    system "rake data_sanity:criteria"
    file = File.open("config/data_sanity_criteria.yml", "w")
    file << template_yml
    file.close
  end
end

def update_data_sanity_criteria(criteria)
  Dir.chdir("#{Rails.root}") do
    file = File.open("config/data_sanity_criteria.yml", "w")
    file << criteria
    file.close
  end
end

def cleanup_data_sanity_criteria
  Dir.chdir("#{Rails.root}") do
    system "rm config/data_sanity_criteria.yml"
  end
end

def template_yml
  "Person:
  name: ['Raju', 'Saju']"
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
data_sanity-0.2.4 spec/support/helper.rb
data_sanity-0.2.3 spec/support/helper.rb
data_sanity-0.2.2 spec/support/helper.rb
data_sanity-0.2.1 spec/support/helper.rb
data_sanity-0.2.0 spec/support/helper.rb
data_sanity-0.1.9 spec/support/helper.rb