utensils 1.5.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 867566b2368297ec3c07f41652ea5006f841b98a
4
- data.tar.gz: ae87f5270e93c0d424c346e29695e587be77ade1
3
+ metadata.gz: 16c088f81325593b63dda02c858669afb44fa4f5
4
+ data.tar.gz: b666cc083f5138b25fdc94c762c287a8dc1a1a29
5
5
  SHA512:
6
- metadata.gz: c338ac0560e65e7e485cc547ec41a54a846ebbf146b591d05525b313d34fa03f73521f5178adb8505cfd44bf87e609b17ce326cf2223d6a3a5ae3aeafdc37189
7
- data.tar.gz: 3a638ae92b4904718c6c354010634ab1de68d24036c826d5596af80bec399ed9b0098cb30db05dedb55a04c6124bc1918331800d5940826844814d00aa459940
6
+ metadata.gz: ffa05bc064ae3bb840b2183e2da5a9768e93b7befcc2d5cfec342de3995498a61adb6a228b0e67d3a94af2427d929c0f892434f6642be6d9a8a34a19d9666f19
7
+ data.tar.gz: f3be7ab7c10974b2b6353b6ff2aafd48f1c4b08283702558ce13f39923267a020aedbce5ea75bdc4d58aa288dd256f6544937c46b1e5bf40c0cabe0f0b94cdb5
data/README.md CHANGED
@@ -19,6 +19,7 @@ require 'utensils/capybara_javascript'
19
19
  require 'utensils/capybara_screenshot'
20
20
  require 'utensils/custom_matchers'
21
21
  require 'utensils/database_cleaner'
22
+ require 'utensils/email'
22
23
  require 'utensils/factory_girl'
23
24
  require 'utensils/omniauth'
24
25
  require 'utensils/timecop'
@@ -37,7 +38,7 @@ page.find(book_2).drag_to(page.find(book_1))
37
38
 
38
39
  ### capybara_javascript
39
40
 
40
- Switches javascript driver to poltergeist
41
+ Switches javascript driver to poltergeist, and blacklists slow external JS
41
42
 
42
43
  To use Poltegeist with [remote debugging](https://github.com/teampoltergeist/poltergeist/blob/master/README.md#remote-debugging-experimental), run test with `POLTERGEIST_DEBUG` set.
43
44
 
@@ -66,6 +67,11 @@ page.should have_order(recipe_3, recipe_1, recipe_2, within: '#recipes') #checks
66
67
 
67
68
  Sets up rspec to use database_cleaner instead of transactional fixtures
68
69
 
70
+ ### email
71
+
72
+ Clears `ActionMailer::Base.deliveries` before each spec and
73
+ includes https://github.com/bmabey/email-spec helpers.
74
+
69
75
  ### factory_girl
70
76
 
71
77
  Use shorthand for FactoryGirl, ie:
@@ -1,10 +1,19 @@
1
- require 'capybara/poltergeist'
2
- Capybara.register_driver :poltergeist_debug do |app|
3
- Capybara::Poltergeist::Driver.new(app, inspector: true)
1
+ require "capybara/poltergeist"
2
+
3
+ POLTERGEIST_URL_BLACKLIST = %w{
4
+ tpc.googlesyndication.com
5
+ www.googletagservices.com
6
+ fonts.googleapis.com
7
+ www.google-analytics.com
8
+ api.mixpanel.com
9
+ cdn.mxpnl.com
10
+ tofu.example.com
11
+ www.googletagmanager.com
12
+ pagead2.googlesyndication.com
13
+ }
14
+
15
+ Capybara.register_driver :poltergeist do |app|
16
+ Capybara::Poltergeist::Driver.new(app, url_blacklist: POLTERGEIST_URL_BLACKLIST, inspector: ENV["POLTERGEIST_DEBUG"])
4
17
  end
5
18
 
6
- Capybara.javascript_driver = if ENV["POLTERGEIST_DEBUG"]
7
- :poltergeist_debug
8
- else
9
- :poltergeist
10
- end
19
+ Capybara.javascript_driver = :poltergeist
@@ -0,0 +1,7 @@
1
+ RSpec.configure do |config|
2
+ config.include(EmailSpec::Helpers)
3
+ config.include(EmailSpec::Matchers)
4
+ config.before(:each) do
5
+ ActionMailer::Base.deliveries.clear
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module Utensils
2
- VERSION = '1.5.0'
2
+ VERSION = '1.6.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utensils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Balvig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-27 00:00:00.000000000 Z
11
+ date: 2016-11-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Rspec stuff we use over and over again
14
14
  email:
@@ -28,6 +28,7 @@ files:
28
28
  - lib/utensils/capybara_screenshot.rb
29
29
  - lib/utensils/custom_matchers.rb
30
30
  - lib/utensils/database_cleaner.rb
31
+ - lib/utensils/email.rb
31
32
  - lib/utensils/factory_girl.rb
32
33
  - lib/utensils/omniauth.rb
33
34
  - lib/utensils/timecop.rb
@@ -59,4 +60,3 @@ signing_key:
59
60
  specification_version: 4
60
61
  summary: Rspec stuff we use over and over again
61
62
  test_files: []
62
- has_rdoc: