Commit cef35259b132f8fc926f1f8667df3bd44a235a2a
1 parent
b904d553
Exists in
fix_sign_up_form
Add basic support for specs
Showing
3 changed files
with
27 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,25 @@ | @@ -0,0 +1,25 @@ | ||
1 | +require_relative '../config/environment' | ||
2 | +require 'rspec/rails' | ||
3 | + | ||
4 | +require_relative 'support/factories' | ||
5 | + | ||
6 | +require 'database_cleaner' | ||
7 | + | ||
8 | +RSpec.configure do |config| | ||
9 | + | ||
10 | + config.fixture_path = 'spec/fixtures' | ||
11 | + | ||
12 | + config.include Noosfero::Factory | ||
13 | + | ||
14 | + config.before(:suite) do | ||
15 | + DatabaseCleaner.strategy = :truncation | ||
16 | + DatabaseCleaner.clean_with :truncation | ||
17 | + end | ||
18 | + config.around(:each) do |example| | ||
19 | + DatabaseCleaner.cleaning do | ||
20 | + example.run | ||
21 | + end | ||
22 | + end | ||
23 | + | ||
24 | +end | ||
25 | + |