big refactor for test and admin namespace
This commit is contained in:
+10
-1
@@ -11,7 +11,14 @@ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
|
||||
|
||||
I18n.locale = :en
|
||||
Devise.stretches = 1
|
||||
Capybara.default_driver = :selenium
|
||||
Capybara.javascript_driver = :selenium
|
||||
#Capybara.default_driver = :selenium
|
||||
|
||||
module FactoryAttributesFor
|
||||
def attributes_for(obj, options={})
|
||||
super(obj, options).merge(build(obj).attributes.select{|k,v| k =~ /_id$/}).symbolize_keys
|
||||
end
|
||||
end
|
||||
RSpec.configure do |config|
|
||||
# == Mock Framework
|
||||
#
|
||||
@@ -22,6 +29,7 @@ RSpec.configure do |config|
|
||||
# config.mock_with :rr
|
||||
config.mock_with :rspec
|
||||
config.include FactoryGirl::Syntax::Methods
|
||||
config.include FactoryAttributesFor
|
||||
config.include Devise::TestHelpers, :type => :controller
|
||||
config.include EndWithMatcher
|
||||
#config.use_transactional_fixtures = true
|
||||
@@ -30,6 +38,7 @@ RSpec.configure do |config|
|
||||
|
||||
# Use color in STDOUT
|
||||
config.color_enabled = true
|
||||
config.fail_fast = true
|
||||
|
||||
# Use color not only in STDOUT but also in pagers and files
|
||||
config.tty = true
|
||||
|
||||
Reference in New Issue
Block a user