Sha256: 8b3cd8112d933f6c1c86efb82e0a1732920c75b19ef47bbb2a7f549461c37001
Contents?: true
Size: 1.3 KB
Versions: 1
Compression:
Stored size: 1.3 KB
Contents
ENV['RAILS_ENV'] ||= 'test' require File.expand_path("../dummy/config/environment.rb", __FILE__) require 'rspec/rails' #require 'rspec/autorun' require 'factory_girl_rails' require 'database_cleaner' require 'capybara/rails' require 'capybara/rspec' require 'pry-rails' Rails.backtrace_cleaner.remove_silencers! # Load support files Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } RSpec.configure do |config| config.mock_with :rspec config.use_transactional_fixtures = false config.infer_base_class_for_anonymous_controllers = false config.order = "random" config.include Capybara::DSL config.expect_with :rspec do |c| c.syntax = [:should, :expect] end config.color = true config.use_transactional_fixtures = false config.before(:each) do DatabaseCleaner.strategy = :transaction DatabaseCleaner.clean_with(:truncation) FactoryGirl.reload end end #For testing jQuery UI slider widget module CapybaraExtension def drag_by(right_by, down_by) base.drag_by(right_by, down_by) end end module CapybaraSeleniumExtension def drag_by(right_by, down_by) driver.browser.action.drag_and_drop_by(native, right_by, down_by).perform end end ::Capybara::Selenium::Node.send :include, CapybaraSeleniumExtension ::Capybara::Node::Element.send :include, CapybaraExtension
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hot_date_rails-1.4.0 | spec/spec_helper.rb |