Top Level Namespace

Includes:
Capybara::Features

Defined Under Namespace

Modules: Capybara, OmniAuth, Rspectacular

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Capybara::Features

included

Class Method Details

.feature(*args, &block) ⇒ Object



28
29
30
31
32
33
34
35
36
# File 'lib/rspectacular/plugins/features.rb', line 28

def self.feature(*args, &block)
  options = args.last.is_a?(Hash) ? args.pop : {}
  options[:capybara_feature] = true
  options[:type] = :feature
  options[:caller] ||= caller
  args.push(options)

  describe(*args, &block)
end

Instance Method Details

#authenticate_api_as(user) ⇒ Object



1
2
3
4
5
# File 'lib/rspectacular/helpers/session_helpers.rb', line 1

def authenticate_api_as(user)
  auth_token = user.respond_to?(:auth_token) ? user.auth_token : user

  request.env['HTTP_AUTHORIZATION'] = "Token #{auth_token}"
end

#factory_nameObject



1
2
3
# File 'lib/rspectacular/helpers/factories.rb', line 1

def factory_name
  described_class.name.underscore
end

#null_described_classObject



1
2
3
# File 'lib/rspectacular/helpers/null_objects.rb', line 1

def null_described_class
  "Null#{described_class.name}".constantize
end