Permalink
Browse files

Added a seeds file

  • Loading branch information...
briantbailey committed Dec 11, 2011
1 parent b816463 commit 1ccfd81f08e6b97fddc3fdc4027e54c4a23ea786
Showing with 18 additions and 0 deletions.
  1. +6 −0 db/seeds.rb
  2. +9 −0 features/seed.feature
  3. +3 −0 features/step_definitions/application_steps.rb
View
@@ -5,3 +5,9 @@
#
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first)
+
+admin_user = User.create(:email => "admin@ticketee.com", :password => "password")
+admin_user.admin = true
+admin_user.confirm!
+
+Project.create(:name => "Ticketee Beta")
View
@@ -0,0 +1,9 @@
+Feature: Seed Data
+ In order to fill the database with the basics
+ As the system
+ I want to run the seed task
+
+ Scenario: The basics
+ Given I have run the seed task
+ And I am signed in as "admin@ticketee.com"
+ Then I should see "Ticketee Beta"
@@ -0,0 +1,3 @@
+Given /^I have run the seed task$/ do
+ load Rails.root + "db/seeds.rb"
+end

0 comments on commit 1ccfd81

Please sign in to comment.