screengem 0.7.2 → 0.7.3

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
  SHA256:
3
- metadata.gz: 90e75e14a7693927e30b7b23bd7866745baad5d347ae53506fbc91a1c0028ab1
4
- data.tar.gz: b6b0827211322a950f065b0adb4417397797ff0dd69da5aaa508d062cf04a1a0
3
+ metadata.gz: 2d8edab18d8c6b3e0110140bb984bfea992b73059ef5cac20ca98b5cc9d06156
4
+ data.tar.gz: bdab7663abf03384a129a2a83c5ea5f4cd3ccb420cbd832b569b334763b4600b
5
5
  SHA512:
6
- metadata.gz: ae4b0d7aa6a4943fa8484258389a33899a72f566ca130347270e88ba9e490e9083e56d999be03fdd19b354875160432e5c987070bfc43b066eb2bdaaa8c756ec
7
- data.tar.gz: acd49c049e3e2cf7e2b75a0909f484fa699f8f2cf9c5f09bcc12652b4f849745a0f91e37fb02867624c80062c87a015322a943560f752662e9bb54f3dee8359e
6
+ metadata.gz: '02983c006f9d8782c79490300caa06056bae08fe1b3ec9acc80c8bf8ec215a1c271e29a213a7b61eac0d7ac6f17394e93879dbf7aa0e4c5461f73c8271c79397'
7
+ data.tar.gz: 6c33e612586f89daf9d6ac323eee7d82126e663b7d1ec80f6c8bfddda2018d7c78e86345ad76a468453cdb1e2c108de53d4f43e472882ec83a77c13e0bb83f19
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## master (unreleased)
4
4
 
5
+ ## 0.7.3 (2019-05-27)
6
+
7
+ ### New Features
8
+
9
+ * Add routes method to screen elements to expose Rails.application.routes.
10
+
5
11
  ## 0.7.2 (2019-04-25)
6
12
 
7
13
  ### New Features
data/lib/screengem.rb CHANGED
@@ -9,6 +9,7 @@ require "rspec/expectations"
9
9
 
10
10
  require "screengem/automatic_visit"
11
11
  require "screengem/incorrect_answer"
12
+ require "screengem/rails_routes"
12
13
  require "screengem/screen_element"
13
14
  require "screengem/screengem_error"
14
15
 
@@ -0,0 +1,10 @@
1
+ module Screengem
2
+ #
3
+ # Exposes the Rails application routes.
4
+ #
5
+ module RailsRoutes
6
+ def routes
7
+ Rails.application.routes if defined?(Rails)
8
+ end
9
+ end
10
+ end
@@ -6,6 +6,7 @@ module Screengem
6
6
  #
7
7
  class ScreenElement
8
8
  include Capybara::DSL
9
+ include Screengem::RailsRoutes
9
10
 
10
11
  def visit(visit_uri = visit_path)
11
12
  return if visit_uri == page.current_path
@@ -1,3 +1,3 @@
1
1
  module Screengem
2
- VERSION = "0.7.2"
2
+ VERSION = "0.7.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: screengem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alistair McKinnell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-25 00:00:00.000000000 Z
11
+ date: 2019-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -209,6 +209,7 @@ files:
209
209
  - lib/screengem/incorrect_answer.rb
210
210
  - lib/screengem/primitive_key.rb
211
211
  - lib/screengem/question.rb
212
+ - lib/screengem/rails_routes.rb
212
213
  - lib/screengem/screen_element.rb
213
214
  - lib/screengem/screen_elements.rb
214
215
  - lib/screengem/screengem_error.rb