big refactor for test and admin namespace

This commit is contained in:
2012-12-04 18:45:18 +01:00
parent 7d64ab2022
commit d8eef4a047
85 changed files with 1403 additions and 1272 deletions
+10 -1
View File
@@ -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