features/support/env.rb in active_cucumber-0.0.7 vs features/support/env.rb in active_cucumber-0.0.8

- old
+ new

@@ -20,10 +20,11 @@ t.datetime 'created_at' end create_table :shows, force: true do |t| t.belongs_to :genre + t.belongs_to :director t.string :name t.datetime 'created_at' end create_table :episodes, force: true do |t| @@ -36,20 +37,26 @@ create_table :subscriptions, force: true do |t| t.string :subscriber t.belongs_to :show t.datetime 'created_at' end + + create_table :directors, force: true do |t| + t.string :name + t.datetime 'created_at' + end end FactoryGirl.define do factory :genre do name { Faker::Book.title } end factory :show do name { Faker::Book.title } + director end factory :episode do name { Faker::Book.title } year { 1960 + rand(40) } @@ -58,16 +65,21 @@ factory :subscription do subscriber { Faker::Name.name } show end + + factory :director do + name { Faker::Name.name } + end end Before do Show.delete_all Episode.delete_all Subscription.delete_all + Director.delete_all @error_checked = false end After do if @error_happened && !@error_checked