class Object

Constants

APP_PATH

This command will automatically be run when you run “rails” with Rails 3 gems installed from the root of your application.

Public Class Methods

global() click to toggle source
# File lib/spree/testing_support/factories.rb, line 4
def self.global
  find_by(name: 'GlobalZone') || FactoryBot.create(:global_zone)
end

Public Instance Methods

wait_for(options = {}) { || ... } click to toggle source
# File lib/spree/testing_support/capybara_ext.rb, line 58
def wait_for(options = {})
  default_options = { error: nil, seconds: 5 }.merge(options)

  Selenium::WebDriver::Wait.new(timeout: default_options[:seconds]).until { yield }
rescue Selenium::WebDriver::Error::TimeOutError
  default_options[:error].nil? ? false : raise(default_options[:error])
end