minitest-capybara 0.4.0 → 0.4.1
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/capybara/assertions.rb +2 -2
- data/lib/capybara/expectations.rb +2 -2
- data/lib/minitest/capybara.rb +4 -2
- data/lib/minitest/capybara/version.rb +1 -1
- data/minitest-capybara.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 224bf84ca515945bdb1fd9eadd906474e2815a3b
|
4
|
+
data.tar.gz: ec8007eac4550b3b9ccb83a534e81da937c2fee5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ff29c7aa41f43c6ba5789b4d16057841d49beb21308b9decbe8f0a92492edefd75a81141361d7229d21b1bcd65e7cece8121dba75fc6ae9d34a9dae5fcafb19
|
7
|
+
data.tar.gz: b5b4ed501094797d961fdd433460cf2a0ee72a5d3e20ff3235a5c6ef063f5bae9c32f802397699334e9acbce4a7c6f5e6a8d85d1d048d19e5a2eab5a54bdf29a
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
data/lib/capybara/assertions.rb
CHANGED
@@ -34,7 +34,7 @@ module Capybara
|
|
34
34
|
alias_method :assert_no_selector, :refute_selector
|
35
35
|
|
36
36
|
ruby = ""
|
37
|
-
(
|
37
|
+
(MiniTest::Capybara.assertions - %w[text content selector]).each do |assertion|
|
38
38
|
ruby << <<-RUBY
|
39
39
|
def assert_#{assertion}(*args)
|
40
40
|
node, *args = prepare_args(args)
|
@@ -42,7 +42,7 @@ module Capybara
|
|
42
42
|
end
|
43
43
|
RUBY
|
44
44
|
end
|
45
|
-
(
|
45
|
+
(MiniTest::Capybara.refutations - %w[text content selector]).each do |refutation|
|
46
46
|
ruby << <<-RUBY
|
47
47
|
def refute_#{refutation}(*args)
|
48
48
|
node, *args = prepare_args(args)
|
@@ -2,11 +2,11 @@ require "minitest/spec"
|
|
2
2
|
|
3
3
|
module Capybara
|
4
4
|
module Expectations
|
5
|
-
|
5
|
+
MiniTest::Capybara.assertions.each do |assertion|
|
6
6
|
infect_an_assertion "assert_#{assertion}", "must_have_#{assertion}", :reverse
|
7
7
|
end
|
8
8
|
|
9
|
-
|
9
|
+
MiniTest::Capybara.refutations.each do |refutation|
|
10
10
|
infect_an_assertion "refute_#{refutation}", "wont_have_#{refutation}", :reverse
|
11
11
|
end
|
12
12
|
|
data/lib/minitest/capybara.rb
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
require "minitest/capybara/version"
|
2
2
|
require "capybara"
|
3
3
|
|
4
|
-
module
|
4
|
+
module MiniTest
|
5
5
|
module Capybara
|
6
6
|
@@assertions = ::Capybara::Session::NODE_METHODS.grep(/^has_/).map { |s| s.to_s.match(/^has_(.*?)\?/)[1] }
|
7
7
|
@@refutations = @@assertions.grep(/^no_/)
|
8
8
|
@@assertions = (@@assertions - @@refutations).sort
|
9
9
|
@@refutations = @@refutations.map { |s| s.match(/^no_(.*)/)[1] }.sort
|
10
|
+
|
10
11
|
def self.assertions
|
11
12
|
@@assertions
|
12
13
|
end
|
14
|
+
|
13
15
|
def self.refutations
|
14
16
|
@@refutations
|
15
17
|
end
|
@@ -21,7 +23,7 @@ require "capybara/assertions"
|
|
21
23
|
require "capybara/expectations"
|
22
24
|
|
23
25
|
# :stopdoc:
|
24
|
-
module
|
26
|
+
module MiniTest
|
25
27
|
module Capybara
|
26
28
|
def self.const_missing const
|
27
29
|
if :Assertions == const
|
data/minitest-capybara.gemspec
CHANGED
@@ -4,7 +4,7 @@ require "minitest/capybara/version"
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "minitest-capybara"
|
7
|
-
s.version =
|
7
|
+
s.version = MiniTest::Capybara::VERSION
|
8
8
|
s.authors = ["Wojciech Mach"]
|
9
9
|
s.email = ["wojtek@wojtekmach.pl"]
|
10
10
|
s.homepage = ""
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-capybara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wojciech Mach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|