From cef35259b132f8fc926f1f8667df3bd44a235a2a Mon Sep 17 00:00:00 2001 From: Braulio Bhavamitra Date: Tue, 2 Aug 2016 18:23:20 -0300 Subject: [PATCH] Add basic support for specs --- spec/fixtures | 1 + spec/spec_helper.rb | 25 +++++++++++++++++++++++++ spec/support | 1 + 3 files changed, 27 insertions(+), 0 deletions(-) create mode 120000 spec/fixtures create mode 100644 spec/spec_helper.rb create mode 120000 spec/support diff --git a/spec/fixtures b/spec/fixtures new file mode 120000 index 0000000..6201ead --- /dev/null +++ b/spec/fixtures @@ -0,0 +1 @@ +../test/fixtures \ No newline at end of file diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..083f463 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,25 @@ +require_relative '../config/environment' +require 'rspec/rails' + +require_relative 'support/factories' + +require 'database_cleaner' + +RSpec.configure do |config| + + config.fixture_path = 'spec/fixtures' + + config.include Noosfero::Factory + + config.before(:suite) do + DatabaseCleaner.strategy = :truncation + DatabaseCleaner.clean_with :truncation + end + config.around(:each) do |example| + DatabaseCleaner.cleaning do + example.run + end + end + +end + diff --git a/spec/support b/spec/support new file mode 120000 index 0000000..c03d629 --- /dev/null +++ b/spec/support @@ -0,0 +1 @@ +../test/support \ No newline at end of file -- libgit2 0.21.2