Sha256: 1274e3bd9f829ae2f1cf2313f5c7df9a3bbedc8d031646a6aaede78795f2dc9c
Contents?: true
Size: 1.28 KB
Versions: 6
Compression:
Stored size: 1.28 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' 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
6 entries across 6 versions & 1 rubygems