configures factory_girl [#5]

This commit is contained in:
rgarcia
2015-07-16 19:24:54 +02:00
parent b1f19f124d
commit 8a3ca2a77f
3 changed files with 11 additions and 0 deletions

View File

@@ -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 # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring' gem 'spring'
gem 'rspec-rails', '~> 3.0' gem 'rspec-rails', '~> 3.0'
gem 'capybara'
gem 'factory_girl_rails'
end end

7
spec/factories.rb Normal file
View File

@@ -0,0 +1,7 @@
FactoryGirl.define do
factory :debate do
title 'Debate title'
description 'Debate description'
terms_of_service '1'
end
end

View File

@@ -1,6 +1,8 @@
require 'factory_girl_rails'
RSpec.configure do |config| RSpec.configure do |config|
config.filter_run :focus config.filter_run :focus
config.run_all_when_everything_filtered = true config.run_all_when_everything_filtered = true
config.include FactoryGirl::Syntax::Methods
# Allows RSpec to persist some state between runs in order to support # Allows RSpec to persist some state between runs in order to support
# the `--only-failures` and `--next-failure` CLI options. # the `--only-failures` and `--next-failure` CLI options.