evil_systems 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -23
  3. data/lib/evil_systems/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c39ae0b47c7d330afb6daa3ef1c8137d190f861905a4a3cdc45305740927ec1
4
- data.tar.gz: e3c40f2764522b1796d11053aecd530267704d87f0ce6732b7d58374a2c030e9
3
+ metadata.gz: 40a098c8d111a96295203242dca8c4b3c8c74d9562617964354b190894f8db09
4
+ data.tar.gz: 8ee1193bc9c323dc8bf82c2668fdad6f182dee7a81a31277ad57d0bb990d8ac4
5
5
  SHA512:
6
- metadata.gz: fed0a5eebfba465c8d2d36228e7b05e6da431a464ee540b34f867c34e64d6263e7cc52d7e9612b679c198514f81ae1fbaff833dc8430600a561e89617ad8a407
7
- data.tar.gz: 992f7b9646ecf70c5c07c032f40af6422e52785897ef7cc29c56cc45b08f875e684fec1a5a9b90c81687a1a67b660159fb3bde20490f7f8e9d2226aea59101f5
6
+ metadata.gz: 6c159f5a4de7c8d8434e47875fe6d7f639541db4e08f14a934d80af96c533aff29eb3eefd9287fe0114d97b7c3f487cf3b6a090fed4f0c74882f3d93c4f2bb3f
7
+ data.tar.gz: d5abc78bdbdebf015ec62bcdc0c737f2ffc91002971664cc6424736f065b37db9e48552e0c168f8f4f913294c50ac98d782dcfa07a4e8f7d364d68669e909d29
data/README.md CHANGED
@@ -3,11 +3,12 @@
3
3
  Why does this exist?
4
4
 
5
5
  I wanted a quick, easy, reusable way to use the settings put forth in
6
- [EvilMartians System of a Test blog post] (https://evilmartians.com/chronicles/system-of-a-test-setting-up-end-to-end-rails-testing)
6
+ [EvilMartians System of a Test blog post](https://evilmartians.com/chronicles/system-of-a-test-setting-up-end-to-end-rails-testing)
7
7
  for Minitest. System of a test is currently written for RSpec.
8
8
 
9
9
  Full API documentation can be found here:
10
10
 
11
+ https://rdoc.info/github/paramagicdev/evil_systems/main
11
12
 
12
13
  ## Installation
13
14
 
@@ -31,13 +32,12 @@ Navigate to `test/application_system_test_case.rb` in your Rails app.
31
32
 
32
33
  Setup your file like so:
33
34
 
34
- ```rb
35
+ ```diff
35
36
  # test/application_system_test_case.rb
36
37
 
37
38
  require 'test_helper'
38
39
 
39
- + # 'capybara' and 'capybara/cuprite' need to be defined for EvilSystems to
40
- work properly.
40
+ + # 'capybara' and 'capybara/cuprite' need to be defined for EvilSystems to work properly.
41
41
  + require 'capybara'
42
42
  + require 'capybara/cuprite'
43
43
 
@@ -65,18 +65,22 @@ end
65
65
  `silent`.
66
66
 
67
67
  Both arguments have to do with precompiling assets.
68
+
68
69
  `:silent` by default is set to `true` and will only tell you when assets
69
- are compiling, and how long it took.
70
+ are compiling, and how long the compilation took.
71
+
70
72
  `:task` defaults to `assets:precompile`, System of a test uses
71
73
  `webpacker:compile`.
72
74
 
73
75
  ### Settings
74
76
 
75
- [x] - Automatically registers a `:cuprite` driver if `Capybara::Cuprite`
77
+ - [x] - Automatically registers a `:cuprite` driver if `Capybara::Cuprite`
76
78
  is defined.
77
- [x] - Automatically sets Capybara's default and javascript driver to
79
+
80
+ - [x] - Automatically sets Capybara's default and javascript driver to
78
81
  `:cuprite`
79
- [x] - Automatically sets `Capybara.app_host`
82
+
83
+ - [x] - Automatically sets `Capybara.app_host`
80
84
 
81
85
  <details>
82
86
  <summary>How `app_host` is set</summary>
@@ -87,14 +91,17 @@ If neither are defined, it will then default to `"0.0.0.0"`
87
91
 
88
92
  </details>
89
93
 
90
- [x] - `Capybara.server_host = "0.0.0.0"`
91
- [x] - `Capybara.default_max_wait_time = 2`
92
- [x] - `Capybara.default_normalize_ws = true` normalizes whitespace in
93
- `has_text?` and similar matchers.
94
- [x] - Sets the `Capybara.save_path` Uses `ENV["CAPYBARA_ARTIFACTS"]` and
95
- falls back to `"./tmp/capybara"`
96
- [x] - Sets a `REMOTE_CHROME` instance if a `ENV["CHROME_URL"]` is found
97
- [x] - Prepends a `last_used_session` attribute accessor to Capybara.
94
+ - [x] - `Capybara.server_host = "0.0.0.0"` Make server listening on all hosts
95
+
96
+ - [x] - `Capybara.default_max_wait_time = 2` Dont spend forever waiting for matchers
97
+
98
+ - [x] - `Capybara.default_normalize_ws = true` normalizes whitespace in `has_text?` and similar matchers.
99
+
100
+ - [x] - Sets the `Capybara.save_path` Uses `ENV["CAPYBARA_ARTIFACTS"]` and falls back to `"./tmp/capybara"`
101
+
102
+ - [x] - Sets a `REMOTE_CHROME` instance if a `ENV["CHROME_URL"]` is found
103
+
104
+ - [x] - Prepends a `last_used_session` attribute accessor to Capybara.
98
105
 
99
106
  ### Helpers
100
107
 
@@ -129,8 +136,7 @@ dom_id(*args)
129
136
  #### SessionHelpers
130
137
 
131
138
  ```rb
132
- # Small wrapper around Capybara.using_session thats easy to call from an
133
- instance
139
+ # Small wrapper around Capybara.using_session thats easy to call from an instance
134
140
  within_session(name_or_session, &block)
135
141
 
136
142
  # Remove all cookie banners
@@ -144,21 +150,20 @@ mark_all_banners_as_read!
144
150
  pause
145
151
 
146
152
  # Opens a Pry or IRB repl. Will use Pry if Pry is defined, fallsback
147
- to debugging with IRB
153
+ # to debugging with IRB
148
154
  debug
149
155
  ```
150
156
 
151
157
  ### Env Variables
152
158
 
159
+ ENV variables used by this gem.
160
+
153
161
  ```rb
154
162
  ENV["APP_HOST"] # used for Capybara.app_host
155
163
  ENV["CAPYBARA_ARTIFACTS"] # used for Capybara.save_path
156
- ENV["CHROME_URL"] # used for setting a remote chrome instance for
157
- Cuprite
164
+ ENV["CHROME_URL"] # used for setting a remote chrome instance for Cuprite
158
165
  ```
159
166
 
160
- ENV variables used by this gem.
161
-
162
167
  ## I don't want to use Cuprite.
163
168
 
164
169
  Thats fine! I totally get it. Selenium is battle tested. Simply remove
@@ -1,3 +1,3 @@
1
1
  module EvilSystems
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evil_systems
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ParamagicDev