capybara-extensions 0.3.1 → 0.3.2

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: 7a7578ae423b1860a572ad5da560de3bffbd51cc
4
- data.tar.gz: 80483da282e01105341220adee22a236414aed51
3
+ metadata.gz: 2c9967dbf793edfaa80f0ff458df34676c135057
4
+ data.tar.gz: 826fad27ed93d9cfab4c5cf593d2043d03640bd3
5
5
  SHA512:
6
- metadata.gz: 66607ca434bc7c7e1d909b3b0034116cae887b95788af1e34123fac25f7310dc7d0afe204093e53c53226916aa834ad0fcb4231ab441e19aba863465d53c2458
7
- data.tar.gz: 911eb6947f96f1e2e2125d42e89040d790fc6df5984ce204019baffd2c9fd6493e82e3de182e4d6c132040184d4d1b867e1f358133ff83b9b5dd23637d3ba657
6
+ metadata.gz: 98eb5242121ad891d8473e7abc76e88cd47e1dd5d3ab0c45f29f2a87574f6beefe7bb46a404ac0bc9a6f2fff4b5a43abc594f2b148303d8e3c59767c49ed068a
7
+ data.tar.gz: d57a543692c616475290f1fdafd1261442867bd55f69222b071bbfad05380345d0b9c0cc8cf76478242f3e3cb5844928b4250513b5fcf12c260bc2db84d656be
data/README.md CHANGED
@@ -26,7 +26,7 @@ require 'capybara-extensions'
26
26
 
27
27
  ## The DSL
28
28
 
29
- A complete reference of the finders and matchers added by CapybaraExtensions is available at [Rubydoc.info](http://rubydoc.info/github/dockyard/capybara-extensions). You can read more about the library in [this blog post](http://reefpoints.dockyard.com/2013/10/25/capybara-extensions.html).
29
+ A complete reference of the finders and matchers added by CapybaraExtensions is available at [Rubydoc.info](http://rubydoc.info/github/dockyard/capybara-extensions). You can read more about the library in [this blog post](http://reefpoints.dockyard.com/2013/11/11/capybara-extensions.html).
30
30
 
31
31
  ## Versioning
32
32
 
@@ -2,14 +2,16 @@ require 'capybara'
2
2
  require 'capybara_minitest_spec'
3
3
 
4
4
  module CapybaraExtensions
5
- ExtensionMethods = []
5
+ def self.extension_methods
6
+ (CapybaraExtensions::Finders.instance_methods + CapybaraExtensions::Matchers.instance_methods - Object.instance_methods).uniq
7
+ end
6
8
  end
7
9
 
8
10
  require 'capybara-extensions/finders'
9
11
  require 'capybara-extensions/matchers'
10
12
 
11
13
  module Capybara::DSL
12
- CapybaraExtensions::ExtensionMethods.each do |method|
14
+ CapybaraExtensions.extension_methods.each do |method|
13
15
  define_method method do |*args, &block|
14
16
  page.send method, *args, &block
15
17
  end
@@ -17,7 +19,7 @@ module Capybara::DSL
17
19
  end
18
20
 
19
21
  class Capybara::Session
20
- CapybaraExtensions::ExtensionMethods.each do |method|
22
+ CapybaraExtensions::extension_methods.each do |method|
21
23
  define_method method do |*args, &block|
22
24
  current_scope.send method, *args, &block
23
25
  end
@@ -2,7 +2,6 @@ require_relative 'locators'
2
2
 
3
3
  module CapybaraExtensions::Finders
4
4
  include CapybaraExtensions::Locators
5
- CapybaraExtensions::ExtensionMethods.concat [:find_article, :find_aside, :find_footer, :find_form, :find_header, :find_list_item, :find_navigation, :find_ordered_list, :find_paragraph, :find_row, :find_section, :find_table, :find_unordered_list, :first_article, :first_aside, :first_footer, :first_form, :first_header, :first_navigation, :first_ordered_list, :first_paragraph, :first_row, :first_section, :first_table, :first_unordered_list, :list_item_number, :row_number]
6
5
 
7
6
  # Find an HTML article based on the given arguments.
8
7
  #
@@ -2,7 +2,6 @@ require_relative 'locators'
2
2
 
3
3
  module CapybaraExtensions::Matchers
4
4
  include CapybaraExtensions::Locators
5
- CapybaraExtensions::ExtensionMethods.concat [:has_field_value?, :has_no_field_value?, :has_image?, :has_no_image?, :has_meta_tag?, :has_no_meta_tag?]
6
5
 
7
6
  # Checks that the current node has an image with the given src or alt.
8
7
  #
@@ -1,3 +1,3 @@
1
1
  module CapybaraExtensions
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Dupuis Jr.