aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support
diff options
context:
space:
mode:
authorJamie Winsor <jamie@enmasse.com>2011-08-10 17:03:37 -0700
committerJamie Winsor <jamie@enmasse.com>2011-08-10 17:03:37 -0700
commit45d8663de5a58740ac6bcf6c18a377aeb6fa0cd5 (patch)
tree88fdedb8bd5e520f66b68d1bebf559c00cf1b23a /spec/support
parentcfba1b86d16da0a4e5c5c070f349974eb29807fe (diff)
downloadrefinerycms-blog-45d8663de5a58740ac6bcf6c18a377aeb6fa0cd5.tar.gz
refinerycms-blog-45d8663de5a58740ac6bcf6c18a377aeb6fa0cd5.tar.bz2
refinerycms-blog-45d8663de5a58740ac6bcf6c18a377aeb6fa0cd5.zip
Dummy app is no longer a submodule, now part of the projected - generated by testing generator
Remove remaining traces of cucumber
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/database_cleaner.rb15
-rw-r--r--spec/support/devise.rb8
-rw-r--r--spec/support/refinery.rb8
3 files changed, 31 insertions, 0 deletions
diff --git a/spec/support/database_cleaner.rb b/spec/support/database_cleaner.rb
new file mode 100644
index 0000000..a104c53
--- /dev/null
+++ b/spec/support/database_cleaner.rb
@@ -0,0 +1,15 @@
+require 'database_cleaner'
+
+RSpec.configure do |config|
+ config.before(:suite) do
+ DatabaseCleaner.strategy = :truncation
+ end
+
+ config.before(:each) do
+ DatabaseCleaner.start
+ end
+
+ config.after(:each) do
+ DatabaseCleaner.clean
+ end
+end
diff --git a/spec/support/devise.rb b/spec/support/devise.rb
new file mode 100644
index 0000000..9dc6823
--- /dev/null
+++ b/spec/support/devise.rb
@@ -0,0 +1,8 @@
+require 'devise'
+
+RSpec.configure do |config|
+ config.mock_with :rspec
+ config.use_transactional_fixtures = false
+
+ config.include Devise::TestHelpers, :type => :controller
+end
diff --git a/spec/support/refinery.rb b/spec/support/refinery.rb
new file mode 100644
index 0000000..2b180db
--- /dev/null
+++ b/spec/support/refinery.rb
@@ -0,0 +1,8 @@
+require 'refinery/testing/factories'
+require 'refinery/testing/controller_macros'
+require 'refinery/testing/request_macros'
+
+RSpec.configure do |config|
+ config.extend Refinery::ControllerMacros::Authentication, :type => :controller
+ config.extend Refinery::RequestMacros::Authentication, :type => :request
+end