features/support/env.rb in active_cucumber-0.0.6 vs features/support/env.rb in active_cucumber-0.0.7
- old
+ new
@@ -30,10 +30,16 @@
t.belongs_to :show
t.string :name
t.integer :year
t.datetime 'created_at'
end
+
+ create_table :subscriptions, force: true do |t|
+ t.string :subscriber
+ t.belongs_to :show
+ t.datetime 'created_at'
+ end
end
FactoryGirl.define do
factory :genre do
@@ -47,15 +53,21 @@
factory :episode do
name { Faker::Book.title }
year { 1960 + rand(40) }
show
end
+
+ factory :subscription do
+ subscriber { Faker::Name.name }
+ show
+ end
end
Before do
Show.delete_all
Episode.delete_all
+ Subscription.delete_all
@error_checked = false
end
After do
if @error_happened && !@error_checked