This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
gem 'rails', '3.1.1' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'pg' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :generate do | |
desc "Overwrite all fixture files with the contents of all existing tables" | |
task :all => :environment do | |
tables = ActiveRecord::Base.connection.tables | |
tables.each do |table_name| | |
if not table_name == "schema_migrations" | |
File.open("db/seed_fixtures/#{table_name}.yml", 'w') do |file| | |
data = ActiveRecord::Base.connection.select_all("SELECT * FROM #{table_name}") | |
rows = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Forked to get it working with Rails 3 and RSpec 2 | |
# | |
# From http://github.com/jaymcgavren | |
# | |
# Save this as rcov.rake in lib/tasks and use rcov:all => | |
# to get accurate spec/feature coverage data | |
# | |
# Use rcov:rspec or rcov:cucumber | |
# to get non-aggregated coverage reports for rspec or cucumber separately |