[Git][noosfero/noosfero][master] Add basic support for specs

Bráulio Bhavamitra gitlab at mg.gitlab.com
Tue Aug 2 18:28:10 BRT 2016


Bráulio Bhavamitra pushed to branch master at Noosfero / noosfero


Commits:
cef35259 by Braulio Bhavamitra at 2016-08-02T18:23:20-03:00
Add basic support for specs

- - - - -


3 changed files:

- + spec/fixtures
- + spec/spec_helper.rb
- + spec/support


Changes:

=====================================
spec/fixtures
=====================================
--- /dev/null
+++ b/spec/fixtures
@@ -0,0 +1 @@
+../test/fixtures
\ No newline at end of file


=====================================
spec/spec_helper.rb
=====================================
--- /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
+


=====================================
spec/support
=====================================
--- /dev/null
+++ b/spec/support
@@ -0,0 +1 @@
+../test/support
\ No newline at end of file



View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/cef35259b132f8fc926f1f8667df3bd44a235a2a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160802/d3efe699/attachment-0001.html>


More information about the Noosfero-dev mailing list