configures factory_girl [#5]
This commit is contained in:
2
Gemfile
2
Gemfile
@@ -42,5 +42,7 @@ group :development, :test do
|
||||
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
||||
gem 'spring'
|
||||
gem 'rspec-rails', '~> 3.0'
|
||||
gem 'capybara'
|
||||
gem 'factory_girl_rails'
|
||||
end
|
||||
|
||||
|
||||
7
spec/factories.rb
Normal file
7
spec/factories.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
FactoryGirl.define do
|
||||
factory :debate do
|
||||
title 'Debate title'
|
||||
description 'Debate description'
|
||||
terms_of_service '1'
|
||||
end
|
||||
end
|
||||
@@ -1,6 +1,8 @@
|
||||
require 'factory_girl_rails'
|
||||
RSpec.configure do |config|
|
||||
config.filter_run :focus
|
||||
config.run_all_when_everything_filtered = true
|
||||
config.include FactoryGirl::Syntax::Methods
|
||||
|
||||
# Allows RSpec to persist some state between runs in order to support
|
||||
# the `--only-failures` and `--next-failure` CLI options.
|
||||
|
||||
Reference in New Issue
Block a user