rspectacular 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,2 +1,55 @@
1
- Rspectacular
1
+ RSpectacular
2
2
  ==============================================================================
3
+
4
+ **It's like RSpec, but more spectacularer**
5
+
6
+ <img src="http://cdn.memegenerator.net/instances/300x/34275719.jpg" align="right" />
7
+
8
+ When installing many of the most popular gems, they typically require some form
9
+ of configuration to be added to your `spec_helper.rb` file in order to make them
10
+ work properly in test mode.
11
+
12
+ Additionally, there are RSpec settings which are pretty standard for most users
13
+ of the framework. Personally we found ourselves copying and pasting files from
14
+ project to project. This was a huge nightmare.
15
+
16
+ What we decided to do was to package it all up as a gem so that we can simply
17
+ include it in the project and update it as necessary. Version 1.x won't allow
18
+ for too many different customizations, but the plan for 2.x is _selective_
19
+ overriding of RSpectacular configuration decisions.
20
+
21
+ The philosophy behind this gem is to:
22
+
23
+ * Retain uber-fast test startup times
24
+ * Keep per-project configurations to a minimum
25
+
26
+ Obviously there may still need to be project-specific configurations that will
27
+ need to take place. However, what you should see when you look at your spec's
28
+ configuration should be things that are exceptional to your project; nothing
29
+ more.
30
+
31
+ [Welcome to RSpectacular](#wiki).
32
+
33
+ Usage
34
+ ------------------------------------------------------------------------------
35
+
36
+ Take a look at the project's [Wiki](#wiki) for full details and usage.
37
+
38
+ Issues
39
+ ------
40
+
41
+ If you have problems, please create a [Github issue](issues).
42
+
43
+ Credits
44
+ -------
45
+
46
+ ![thekompanee](http://www.thekompanee.com/public_files/kompanee-github-readme-logo.png)
47
+
48
+ rspectacular is maintained by [The Kompanee, Ltd.](http://www.thekompanee.com)
49
+
50
+ The names and logos for The Kompanee are trademarks of The Kompanee, Ltd.
51
+
52
+ License
53
+ -------
54
+
55
+ rspectacular is Copyright &copy; 2013 The Kompanee. It is free software, and may be redistributed under the terms specified in the LICENSE file.
@@ -0,0 +1 @@
1
+ Dir[File.expand_path('../omniauth/*.rb', __FILE__)].each { |f| require f }
@@ -0,0 +1,43 @@
1
+ module OmniAuth
2
+ module Facebook
3
+ module MockAuthentication
4
+ def self.user
5
+ {
6
+ 'provider' => 'facebook',
7
+ 'uid' => '100002971692646',
8
+ 'credentials' => {
9
+ 'token' => 'my_facebook_token'
10
+ },
11
+ 'info' => {
12
+ 'name' => 'Sharon Letuchysky',
13
+ 'email' => nil,
14
+ 'nickname' => nil,
15
+ 'first_name' => 'Sharon',
16
+ 'last_name' => 'Letuchysky',
17
+ 'location' => nil,
18
+ 'description' => nil,
19
+ 'image' => 'http://graph.facebook.com/100002971692646/picture?type=square',
20
+ 'phone' => nil,
21
+ 'urls' => {
22
+ 'Facebook' => 'http://www.facebook.com/profile.php?id=100002971692646',
23
+ 'Website' => nil
24
+ }
25
+ },
26
+ 'extra' => {
27
+ 'user_hash' => {
28
+ 'id' => '100002971692646',
29
+ 'name' => 'Sharon Ambiggjcaccg Letuchysky',
30
+ 'first_name' => 'Sharon',
31
+ 'middle_name' => 'Ambiggjcaccg',
32
+ 'last_name' => 'Letuchysky',
33
+ 'link' => 'http://www.facebook.com/profile.php?id=100002971692646',
34
+ 'gender' => 'female',
35
+ 'locale' => 'en_US',
36
+ 'updated_time' => '2011-09-11T17:00:51+0000'
37
+ }
38
+ }
39
+ }
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,43 @@
1
+ module OmniAuth
2
+ module Twitter
3
+ module MockAuthentication
4
+ def self.user
5
+ {
6
+ 'provider' => 'twitter',
7
+ 'uid' => '100002971692646',
8
+ 'credentials' => {
9
+ 'token' => 'my_twitter_token'
10
+ },
11
+ 'info' => {
12
+ 'name' => 'Sharon Letuchysky',
13
+ 'email' => nil,
14
+ 'nickname' => nil,
15
+ 'first_name' => 'Sharon',
16
+ 'last_name' => 'Letuchysky',
17
+ 'location' => nil,
18
+ 'description' => nil,
19
+ 'image' => 'http://graph.facebook.com/100002971692646/picture?type=square',
20
+ 'phone' => nil,
21
+ 'urls' => {
22
+ 'Facebook' => 'http://www.facebook.com/profile.php?id=100002971692646',
23
+ 'Website' => nil
24
+ }
25
+ },
26
+ 'extra' => {
27
+ 'user_hash' => {
28
+ 'id' => '100002971692646',
29
+ 'name' => 'Sharon Ambiggjcaccg Letuchysky',
30
+ 'first_name' => 'Sharon',
31
+ 'middle_name' => 'Ambiggjcaccg',
32
+ 'last_name' => 'Letuchysky',
33
+ 'link' => 'http://www.facebook.com/profile.php?id=100002971692646',
34
+ 'gender' => 'female',
35
+ 'locale' => 'en_US',
36
+ 'updated_time' => '2011-09-11T17:00:51+0000'
37
+ }
38
+ }
39
+ }
40
+ end
41
+ end
42
+ end
43
+ end
@@ -1,3 +1,24 @@
1
- if defined?(Capybara::Driver::Base) && defined?(Capybara::Webkit)
2
- Capybara.javascript_driver = :webkit
1
+ ##############################################################################
2
+ # Capybara Plugin
3
+ ##############################################################################
4
+ #
5
+ # This plugin does not attempt to require capybara. It assumes that if you're
6
+ # using capybara, you're probably using something like Bundler which has already
7
+ # required it for you.
8
+ #
9
+ # If this is not the case, you will need to require it prior to requiring
10
+ # rspectacular.
11
+ #
12
+ # The same goes for capybara-webkit. It must be required before rspectacular.
13
+ #
14
+ if defined?(Capybara::Driver::Base)
15
+ if defined?(Capybara::Webkit)
16
+ Capybara.javascript_driver = :webkit
17
+ end
18
+
19
+ RSpec.configure do |config|
20
+ config.before(:each, :js => true) do
21
+ page.driver.reset!
22
+ end
23
+ end
3
24
  end
@@ -1,24 +1,30 @@
1
- ###
2
- # Make CarrierWave tests faster and more reliable
3
- #
4
- if defined? CarrierWave
1
+ ##############################################################################
2
+ # CarrierWave Plugin
3
+ ##############################################################################
4
+
5
+ begin
6
+ require 'carrierwave'
5
7
  require 'carrierwave/test/matchers'
6
8
 
9
+ RSpec.configure do |config|
10
+ config.include CarrierWave::Test::Matchers, :file_attachment => true
11
+ end
12
+
7
13
  CarrierWave.configure do |config|
8
14
  config.storage = :file
9
- config.root = Rails.root.join('tmp')
15
+ config.root = File.expand_path('./tmp')
10
16
  config.enable_processing = false
11
17
  end
12
18
 
13
19
  RSpec.configure do |config|
14
- config.include CarrierWave::Test::Matchers, :carrier_wave => true
15
-
16
- config.before(:each, :carrier_wave => true) do
20
+ config.around(:each, :file_attachment => true) do |example|
21
+ previous_carrierwave_processing_mode = subject.class.enable_processing
17
22
  subject.class.enable_processing = true
18
- end
19
23
 
20
- config.after(:each, :carrier_wave => true) do
21
- subject.class.enable_processing = false
24
+ example.run
25
+
26
+ subject.class.enable_processing = previous_carrierwave_processing_mode
22
27
  end
23
28
  end
29
+ rescue LoadError
24
30
  end
@@ -1,7 +1,17 @@
1
- if defined? ActiveRecord::Base
1
+ ##############################################################################
2
+ # Database Cleaner Plugin
3
+ ##############################################################################
4
+
5
+ begin
6
+ require 'database_cleaner'
7
+
2
8
  begin
3
- require 'database_cleaner'
9
+ autodetected = DatabaseCleaner::Base.new.send(:autodetect)
10
+ rescue DatabaseCleaner::NoORMDetected
11
+ autodetected = false
12
+ end
4
13
 
14
+ if autodetected
5
15
  RSpec.configure do |config|
6
16
  config.before(:suite) do
7
17
  DatabaseCleaner.clean_with(:truncation)
@@ -29,11 +39,11 @@ if defined? ActiveRecord::Base
29
39
  config.use_transactional_fixtures = false
30
40
  end
31
41
  end
32
- rescue LoadError
33
- if defined? RSpec::Rails
34
- RSpec.configure do |config|
35
- config.use_transactional_fixtures = true
36
- end
42
+ end
43
+ rescue LoadError, DatabaseCleaner::NoORMDetected
44
+ if defined? RSpec::Rails
45
+ RSpec.configure do |config|
46
+ config.use_transactional_fixtures = true
37
47
  end
38
48
  end
39
49
  end
@@ -1,8 +1,14 @@
1
- if defined? Devise
2
- # Don't go nuts encrypting the password, we're just testing
1
+ ##############################################################################
2
+ # Devise Plugin
3
+ ##############################################################################
4
+
5
+ begin
6
+ require 'devise'
7
+
3
8
  Devise.stretches = 1
4
9
 
5
10
  RSpec.configure do |config|
6
11
  config.include Devise::TestHelpers, :type => :controller
7
12
  end
13
+ rescue LoadError
8
14
  end
@@ -1,8 +1,21 @@
1
- if defined? EmailSpec
1
+ ##############################################################################
2
+ # Email Plugin
3
+ ##############################################################################
4
+ #
5
+ # The approach to this plugin is twofold. First it uses the excellent email_spec
6
+ # gem to add helpers and matchers to any spec file with :email => true set.
7
+ # Secondly, it will also clear all deliveries from ActionMailer if it is loaded.
8
+ #
9
+ # https://github.com/bmabey/email-spec/
10
+ #
11
+ begin
12
+ require 'email_spec'
13
+
2
14
  RSpec.configure do |config|
3
15
  config.include EmailSpec::Helpers, :email => true
4
16
  config.include EmailSpec::Matchers, :email => true
5
17
  end
18
+ rescue LoadError
6
19
  end
7
20
 
8
21
  if defined? ActionMailer
@@ -1,3 +1,7 @@
1
+ ##############################################################################
2
+ # Factory Girl Plugin
3
+ ##############################################################################
4
+
1
5
  begin
2
6
  require 'factory_girl'
3
7
 
@@ -0,0 +1,42 @@
1
+ ##############################################################################
2
+ # Features Plugin
3
+ ##############################################################################
4
+ #
5
+ # This plugin enables the feature/scenario/background/given syntax in RSpec
6
+ # without requiring Capybara as a dependency (and may also be used outside of
7
+ # Rails). The contents of this file are taken verbatim from
8
+ #
9
+ # https://github.com/jnicklas/capybara/blob/cd4327857bd3bafa8614b7bffb2886a8ab401953/lib/capybara/rspec/features.rb
10
+ #
11
+ # and should be updated whenever that file is updated.
12
+ #
13
+ module Capybara
14
+ module Features
15
+ def self.included(base)
16
+ base.instance_eval do
17
+ alias :background :before
18
+ alias :scenario :it
19
+ alias :xscenario :xit
20
+ alias :given :let
21
+ alias :given! :let!
22
+
23
+ if defined?(RSpec::Rails)
24
+ include RSpec::Rails::RequestExampleGroup
25
+ include Rack::Test::Methods
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+
32
+ def self.feature(*args, &block)
33
+ options = if args.last.is_a?(Hash) then args.pop else {} end
34
+ options[:capybara_feature] = true
35
+ options[:type] = :feature
36
+ options[:caller] ||= caller
37
+ args.push(options)
38
+
39
+ describe(*args, &block)
40
+ end
41
+
42
+ RSpec.configuration.include Capybara::Features, :capybara_feature => true
@@ -1,9 +1,17 @@
1
- if defined? OmniAuth
1
+ ##############################################################################
2
+ # OmniAuth Plugin
3
+ ##############################################################################
4
+
5
+ begin
6
+ require 'omniauth'
7
+ require 'rspectacular/mock_authentications/omniauth'
8
+
2
9
  ###
3
10
  # Tell OmniAuth to just return whatever hash we want for each auth type
4
11
  #
5
12
  OmniAuth.config.test_mode = true
6
- OmniAuth.config.mock_auth[:facebook] = MockAuthentication::Facebook.user
13
+ OmniAuth.config.mock_auth[:facebook] = OmniAuth::Facebook::MockAuthentication.user
14
+ OmniAuth.config.mock_auth[:twitter] = OmniAuth::Twitter::MockAuthentication.user
7
15
 
8
16
  ###
9
17
  # Except we don't want OmniAuth to fake anything when doing live tests
@@ -11,12 +19,12 @@ if defined? OmniAuth
11
19
  RSpec.configure do |config|
12
20
  config.around(:each, :js => true) do |example|
13
21
  previous_omniauth_test_mode = OmniAuth.config.test_mode
14
-
15
- OmniAuth.config.test_mode = false
22
+ OmniAuth.config.test_mode = false
16
23
 
17
24
  example.run
18
25
 
19
26
  OmniAuth.config.test_mode = previous_omniauth_test_mode
20
27
  end
21
28
  end
29
+ rescue LoadError
22
30
  end
@@ -1,14 +1,11 @@
1
- ###
2
- # PayPal requires that you log into the PayPal sandbox before getting access
3
- # to test users.
4
- #
1
+ ##############################################################################
2
+ # PayPal Plugin
3
+ ##############################################################################
4
+
5
5
  RSpec.configure do |config|
6
6
  config.before(:each, :js => true, :paypal => true) do
7
- log_in_to_paypal_sandbox
8
- end
7
+ require 'rspectacular/helpers/paypal'
9
8
 
10
- config.after(:each, :js => true, :paypal => true) do
11
- log_out_of_paypal
12
- log_out_of_paypal_sandbox
9
+ log_in_to_paypal_sandbox
13
10
  end
14
11
  end
@@ -1,5 +1,12 @@
1
- if defined? Recaptcha
1
+ ##############################################################################
2
+ # Recaptcha Plugin
3
+ ##############################################################################
4
+
5
+ begin
6
+ require 'recaptcha'
7
+
2
8
  Recaptcha.configure do |config|
3
9
  config.skip_verify_env = ['test']
4
10
  end
11
+ rescue LoadError
5
12
  end
@@ -1,15 +1,24 @@
1
- if defined? Shoulda::Matchers
2
- module ShouldaRoutingMatchers
3
- def route(method, path)
4
- Shoulda::Matchers::ActionController::RouteMatcher.new(method, path, self)
1
+ ##############################################################################
2
+ # Shoulda Plugin
3
+ ##############################################################################
4
+
5
+ if defined? RSpec::Rails
6
+ begin
7
+ require 'shoulda-matchers'
8
+
9
+ module ShouldaRoutingMatchers
10
+ def route(method, path)
11
+ Shoulda::Matchers::ActionController::RouteMatcher.new(method, path, self)
12
+ end
5
13
  end
6
- end
7
14
 
8
- module RSpec
9
- module Rails
10
- module RoutingExampleGroup
11
- include ShouldaRoutingMatchers
15
+ module RSpec
16
+ module Rails
17
+ module RoutingExampleGroup
18
+ include ShouldaRoutingMatchers
19
+ end
12
20
  end
13
21
  end
22
+ rescue LoadError
14
23
  end
15
24
  end
@@ -1,12 +1,15 @@
1
- require 'singleton'
1
+ ##############################################################################
2
+ # Singleton Plugin
3
+ ##############################################################################
2
4
 
3
5
  RSpec.configure do |config|
4
- config.around(:each, :singletons => lambda { |v| !!v }) do |example|
6
+ config.before(:each, :singletons => lambda { |v| !!v }) do |example|
7
+ require 'singleton'
8
+
5
9
  options = example.metadata[:singletons]
10
+ options = options.is_a?(TrueClass) ? subject.class : options
6
11
  singletons_to_reset = options.respond_to?(:each) ? options : [options]
7
12
 
8
- example.run
9
-
10
13
  singletons_to_reset.each do |singleton|
11
14
  Singleton.__init__(singleton)
12
15
  end
@@ -1,3 +1,7 @@
1
+ ##############################################################################
2
+ # Timecop Plugin
3
+ ##############################################################################
4
+
1
5
  begin
2
6
  require 'timecop'
3
7
 
@@ -1,12 +1,21 @@
1
+ ##############################################################################
2
+ # VCR Plugin
3
+ ##############################################################################
4
+
1
5
  begin
2
6
  require 'vcr'
7
+ require 'rspectacular/plugins/webmock'
3
8
 
4
9
  VCR.configure do |config|
5
- config.cassette_library_dir = 'tmp/vcr_cassettes'
10
+ config.cassette_library_dir = File.expand_path('./tmp/vcr_cassettes')
6
11
 
7
- config.hook_into :faraday
12
+ config.hook_into :webmock
8
13
  config.configure_rspec_metadata!
9
14
  end
10
15
 
16
+ RSpec.configure do |config|
17
+ config.extend VCR::RSpec::Macros
18
+ end
19
+
11
20
  rescue LoadError
12
21
  end
@@ -1,10 +1,17 @@
1
+ ##############################################################################
2
+ # WebMock Plugin
3
+ ##############################################################################
4
+
1
5
  begin
2
6
  require 'webmock/rspec'
3
7
 
4
8
  RSpec.configure do |config|
5
9
  config.around(:each, :web_mock => lambda { |v| !!v }) do |example|
6
10
  options = example.metadata[:web_mock]
7
- options = options.is_a?(Hash) ? options : {}
11
+ options = case options
12
+ when TrueClass
13
+ { :allow_localhost => true }
14
+ end
8
15
 
9
16
  WebMock.disable_net_connect!(options)
10
17
 
@@ -1,7 +1,7 @@
1
1
  require 'active_record'
2
2
 
3
- rails_database_yaml_file_path = File.expand_path('../../config/database.yml', __FILE__)
4
- rails_engine_database_yaml_file_path = File.expand_path('../dummy/config/database.yml', __FILE__)
3
+ rails_database_yaml_file_path = File.join(Dir.pwd, 'config', 'database.yml')
4
+ rails_engine_database_yaml_file_path = File.join(Dir.pwd, 'spec', 'dummy', 'config', 'database.yml')
5
5
 
6
6
  database_yaml_file_path = if File.exist? rails_engine_database_yaml_file_path
7
7
  rails_engine_database_yaml_file_path
@@ -15,8 +15,4 @@ ActiveRecord::Base.establish_connection(connection_info)
15
15
 
16
16
  require 'rspectacular'
17
17
 
18
- Dir[File.expand_path('../support/**/*.rb', __FILE__)].each { |f| require f }
19
-
20
- RSpec.configure do |config|
21
- config.order = 'random'
22
- end
18
+ Dir[File.join(Dir.pwd, 'spec', 'support', '**', '*.rb')].each { |f| require f }
@@ -0,0 +1,9 @@
1
+ ENV["RAILS_ENV"] ||= 'test'
2
+ require File.join(Dir.pwd, 'spec', 'dummy', 'config', 'environment')
3
+
4
+ require 'rspec/rails'
5
+ require 'rspec/autorun'
6
+
7
+ require 'rspectacular'
8
+
9
+ Dir[File.join(Dir.pwd, 'spec', 'support', '**', '*.rb')].each { |f| require f }
@@ -1,7 +1 @@
1
- require 'rspectacular/support/general'
2
- require 'rspectacular/support/garbage_collection'
3
- require 'rspectacular/support/random'
4
- require 'rspectacular/support/focused'
5
- require 'rspectacular/support/pending'
6
- require 'rspectacular/support/selenium'
7
- require 'rspectacular/support/formatters'
1
+ Dir[File.expand_path('../support/**/*.rb', __FILE__)].each { |f| require f }
@@ -1,3 +1,3 @@
1
1
  module RSpectacular
2
- VERSION = '0.12.0'
2
+ VERSION = '0.13.0'
3
3
  end
metadata CHANGED
@@ -1,19 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspectacular
3
3
  version: !ruby/object:Gem::Version
4
+ version: 0.13.0
4
5
  prerelease:
5
- version: 0.12.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - jfelchner
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-23 00:00:00.000000000 Z
12
+ date: 2013-05-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- prerelease: false
16
- type: :runtime
17
15
  name: rspec
18
16
  requirement: !ruby/object:Gem::Requirement
19
17
  none: false
@@ -21,6 +19,8 @@ dependencies:
21
19
  - - ~>
22
20
  - !ruby/object:Gem::Version
23
21
  version: '2.12'
22
+ type: :runtime
23
+ prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
@@ -28,8 +28,6 @@ dependencies:
28
28
  - !ruby/object:Gem::Version
29
29
  version: '2.12'
30
30
  - !ruby/object:Gem::Dependency
31
- prerelease: false
32
- type: :runtime
33
31
  name: fuubar
34
32
  requirement: !ruby/object:Gem::Requirement
35
33
  none: false
@@ -37,6 +35,8 @@ dependencies:
37
35
  - - ~>
38
36
  - !ruby/object:Gem::Version
39
37
  version: '1.0'
38
+ type: :runtime
39
+ prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
@@ -66,13 +66,16 @@ files:
66
66
  - lib/rspectacular/matchers/active_record.rb
67
67
  - lib/rspectacular/matchers/authentication.rb
68
68
  - lib/rspectacular/matchers.rb
69
+ - lib/rspectacular/mock_authentications/omniauth/facebook.rb
70
+ - lib/rspectacular/mock_authentications/omniauth/twitter.rb
71
+ - lib/rspectacular/mock_authentications/omniauth.rb
69
72
  - lib/rspectacular/plugins/capybara.rb
70
73
  - lib/rspectacular/plugins/carrier_wave.rb
71
74
  - lib/rspectacular/plugins/database_cleaner.rb
72
75
  - lib/rspectacular/plugins/devise.rb
73
76
  - lib/rspectacular/plugins/email.rb
74
- - lib/rspectacular/plugins/facebook.rb
75
77
  - lib/rspectacular/plugins/factory_girl.rb
78
+ - lib/rspectacular/plugins/features.rb
76
79
  - lib/rspectacular/plugins/omniauth.rb
77
80
  - lib/rspectacular/plugins/paypal.rb
78
81
  - lib/rspectacular/plugins/recaptcha.rb
@@ -84,7 +87,8 @@ files:
84
87
  - lib/rspectacular/plugins.rb
85
88
  - lib/rspectacular/selectors/defaults.rb
86
89
  - lib/rspectacular/selectors.rb
87
- - lib/rspectacular/spec_helpers/active_record_spec_helper.rb
90
+ - lib/rspectacular/spec_helpers/active_record_basic.rb
91
+ - lib/rspectacular/spec_helpers/rails_engine.rb
88
92
  - lib/rspectacular/support/focused.rb
89
93
  - lib/rspectacular/support/formatters.rb
90
94
  - lib/rspectacular/support/garbage_collection.rb
@@ -121,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
125
  version: '0'
122
126
  requirements: []
123
127
  rubyforge_project: rspectacular
124
- rubygems_version: 1.8.25
128
+ rubygems_version: 1.8.23
125
129
  signing_key:
126
130
  specification_version: 3
127
131
  summary: RSpec Support And Matchers
@@ -1,14 +0,0 @@
1
- if defined?(Capybara::Driver::Base)
2
- RSpec.configure do |config|
3
- config.after(:each, :facebook => true) do
4
- visit 'https://www.facebook.com'
5
-
6
- if Capybara.current_session.has_link? idsf('the Facebook account menu')
7
- click_link idsf('the Facebook account menu')
8
- click_button 'Log Out'
9
-
10
- page.driver.browser.switch_to.alert.accept
11
- end
12
- end
13
- end
14
- end