add testing device images and a lot more, before bootstrap:themed
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
||||
ENV["RAILS_ENV"] ||= 'test'
|
||||
require File.expand_path("../../config/environment", __FILE__)
|
||||
require 'rspec/rails'
|
||||
require 'rspec/autorun'
|
||||
|
||||
# Requires supporting ruby files with custom matchers and macros, etc,
|
||||
# in spec/support/ and its subdirectories.
|
||||
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
|
||||
#Dir[Rails.root.join("spec/factories/**/*.rb")].each {|f| require f }
|
||||
|
||||
I18n.locale = :en
|
||||
Devise.stretches = 1
|
||||
Capybara.default_driver = :selenium
|
||||
RSpec.configure do |config|
|
||||
# == Mock Framework
|
||||
#
|
||||
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
||||
#
|
||||
# config.mock_with :mocha
|
||||
# config.mock_with :flexmock
|
||||
# config.mock_with :rr
|
||||
config.mock_with :rspec
|
||||
config.include FactoryGirl::Syntax::Methods
|
||||
config.include Devise::TestHelpers, :type => :controller
|
||||
config.include EndWithMatcher
|
||||
#config.use_transactional_fixtures = true
|
||||
config.infer_base_class_for_anonymous_controllers = true
|
||||
config.render_views = true
|
||||
|
||||
# Use color in STDOUT
|
||||
config.color_enabled = true
|
||||
|
||||
# Use color not only in STDOUT but also in pagers and files
|
||||
config.tty = true
|
||||
|
||||
# Use the specified formatter
|
||||
config.formatter = :documentation # :progress, :html, :textmate
|
||||
|
||||
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
||||
#config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
||||
|
||||
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
||||
# examples within a transaction, remove the following line or assign false
|
||||
# instead of true.
|
||||
#config.use_transactional_fixtures = true
|
||||
|
||||
config.before :each do
|
||||
CouchPotato.couchrest_database.recreate!
|
||||
end
|
||||
config.before :each, type: :request do
|
||||
#Capybara.current_driver = :selenium
|
||||
#sign_in_user_through_request
|
||||
end
|
||||
# If true, the base class of anonymous controllers will be inferred
|
||||
# automatically. This will be the default behavior in future versions of
|
||||
# rspec-rails.
|
||||
#config.infer_base_class_for_anonymous_controllers = true
|
||||
def sign_in_user_through_request
|
||||
visit "/users/sign_in"
|
||||
fill_in 'user[email]', with: @user.email
|
||||
fill_in 'user[password]', with: @user.password
|
||||
click_on 'Inloggen'
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user