Created
December 2, 2013 23:58
-
-
Save jakenotjacob/7761365 to your computer and use it in GitHub Desktop.
Seeding error
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
#=> spec/features/seeds_spec.rb | |
require 'spec_helper' | |
feature "Seed Data" do | |
scenario "The basics" do | |
#Load bin/rake task code prior to running | |
load Rails.root + "db/seeds.rb" | |
user = User.where(email: "admin@example.com").first! | |
project = Project.where(name: "Ticketee Beta").first! | |
end | |
end | |
#=> db/seeds.rb | |
User.create(email: "admin@example.com", | |
password: "password", | |
admin: true) | |
Project.create(name: "Ticketee Beta") | |
##This is the output from tailing the development log## | |
# ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" | |
# (0.1ms) BEGIN | |
# (0.1ms) ROLLBACK | |
# (0.1ms) BEGIN | |
# SQL (1.6ms) INSERT INTO "projects" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", #Mon, 02 Dec 2013 16:49:52 UTC +00:00], ["name", "Ticketee Beta"], ["updated_at", Mon, 02 Dec 2013 16:49:52 UTC +00:00]] | |
# (18.2ms) COMMIT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment