fracture 0.11.4 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/CHANGELOG.md +4 -0
- data/lib/fracture/matchers/matcher.rb +18 -18
- data/lib/fracture/version.rb +1 -1
- metadata +5 -15
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZDdmOTc4ODBlMTUwNzE5ZTQ1YzZlYzdmNTYwOTRlNThhODQyZjdkYg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NWIwYWI2MGI1OWJmMTliNjcyYjhhNjVmNmQwNTRhYzFjY2M2MTk2ZQ==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YjY0YzE0MzI1NDgyNWI4NTk3NmRlYzcxOThkZGUyYjcyZjI3ZDc1ZTllNjZh
|
10
|
+
MTQ0NGFkYWZhZDQ4YmVjODBmOWIzYzc4MGQzOWRmNjA5MTFhNDk0ZTgxZDYy
|
11
|
+
Yzc1NWU0OWFhMWJiMGRhYmM3MTZlZWEzY2Q0NzE4OGZkYTExMzY=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NzhlYTlkNWYxODYxYmQ2MjkwNmM0M2FmYWEyOTQxNjgwZDUxMmYwNDQ0OGRl
|
14
|
+
N2E2ZDAzMzZjZmQ4YWFhNTNlMjU1YWIxZTc4MDUwYzVkODRkYjU1YWQ2OTFl
|
15
|
+
NmQxNjg0NzA3MWQ0MjY5NzhkMWE2ODVjMDQ4YTNmMTQxODI1MDQ=
|
data/CHANGELOG.md
CHANGED
@@ -4,13 +4,13 @@ RSpec::Matchers.define :have_fracture do |*fracture_labels|
|
|
4
4
|
@results[:passed]
|
5
5
|
end
|
6
6
|
|
7
|
-
|
7
|
+
match_when_negated do |page|
|
8
8
|
@results = Fracture.test_fractures page, true, fracture_labels, nil
|
9
9
|
@results[:passed]
|
10
10
|
end
|
11
11
|
|
12
|
-
|
13
|
-
|
12
|
+
failure_message { |actual| common_error(actual, @results) }
|
13
|
+
failure_message_when_negated { |actual| common_error(actual, @results) }
|
14
14
|
end
|
15
15
|
|
16
16
|
RSpec::Matchers.define :have_all_fractures do
|
@@ -19,13 +19,13 @@ RSpec::Matchers.define :have_all_fractures do
|
|
19
19
|
@results[:passed]
|
20
20
|
end
|
21
21
|
|
22
|
-
|
22
|
+
match_when_negated do |page|
|
23
23
|
@results = Fracture.test_fractures page, true, Fracture.all.keys, nil
|
24
24
|
@results[:passed]
|
25
25
|
end
|
26
26
|
|
27
|
-
|
28
|
-
|
27
|
+
failure_message { |actual| common_error(actual, @results) }
|
28
|
+
failure_message_when_negated { |actual| common_error(actual, @results) }
|
29
29
|
end
|
30
30
|
|
31
31
|
RSpec::Matchers.define :have_no_fractures do
|
@@ -34,13 +34,13 @@ RSpec::Matchers.define :have_no_fractures do
|
|
34
34
|
@results[:passed]
|
35
35
|
end
|
36
36
|
|
37
|
-
|
37
|
+
match_when_negated do |page|
|
38
38
|
@results = Fracture.test_fractures page, true, nil, Fracture.all.keys
|
39
39
|
@results[:passed]
|
40
40
|
end
|
41
41
|
|
42
|
-
|
43
|
-
|
42
|
+
failure_message { |actual| common_error(actual, @results) }
|
43
|
+
failure_message_when_negated { |actual| common_error(actual, @results) }
|
44
44
|
end
|
45
45
|
|
46
46
|
RSpec::Matchers.define :have_all_fractures_except do |*fracture_labels|
|
@@ -49,13 +49,13 @@ RSpec::Matchers.define :have_all_fractures_except do |*fracture_labels|
|
|
49
49
|
@results[:passed]
|
50
50
|
end
|
51
51
|
|
52
|
-
|
52
|
+
match_when_negated do |page|
|
53
53
|
@results = Fracture.have_all_except_test(page, true, fracture_labels)
|
54
54
|
@results[:passed]
|
55
55
|
end
|
56
56
|
|
57
|
-
|
58
|
-
|
57
|
+
failure_message { |actual| common_error(actual, @results) }
|
58
|
+
failure_message_when_negated { |actual| common_error(actual, @results) }
|
59
59
|
end
|
60
60
|
|
61
61
|
RSpec::Matchers.define :have_only_fractures do |*fracture_labels|
|
@@ -64,13 +64,13 @@ RSpec::Matchers.define :have_only_fractures do |*fracture_labels|
|
|
64
64
|
@results[:passed]
|
65
65
|
end
|
66
66
|
|
67
|
-
|
67
|
+
match_when_negated do |page|
|
68
68
|
@results = Fracture.have_only_test(page, true, fracture_labels)
|
69
69
|
@results[:passed]
|
70
70
|
end
|
71
71
|
|
72
|
-
|
73
|
-
|
72
|
+
failure_message { |actual| common_error(actual, @results) }
|
73
|
+
failure_message_when_negated { |actual| common_error(actual, @results) }
|
74
74
|
end
|
75
75
|
|
76
76
|
def common_error(actual, results)
|
@@ -98,7 +98,7 @@ RSpec::Matchers.define :have_a_form do
|
|
98
98
|
@has_form && !(@new_form && @edit_found) && (!@edit_form || @edit_found) && (!@expected_path || (@found_action == @expected_path))
|
99
99
|
end
|
100
100
|
|
101
|
-
|
101
|
+
match_when_negated do |page|
|
102
102
|
raise "Cannot use should_not chained with .is_for, .that_is_edit or .with_path_of " if @new_form || @edit_form || @expected_path
|
103
103
|
page = Nokogiri::HTML.parse(page)
|
104
104
|
!page.at("form[method='post']")
|
@@ -109,7 +109,7 @@ RSpec::Matchers.define :have_a_form do
|
|
109
109
|
chain(:that_is_edit) { @edit_form = true }
|
110
110
|
#chain(:with_path) { |path| @expected_path = path }
|
111
111
|
chain(:with_path_of) { |path| @expected_path = path }
|
112
|
-
|
112
|
+
failure_message do
|
113
113
|
ret = case
|
114
114
|
when !@has_form
|
115
115
|
"expected to find a form on the page\n"
|
@@ -124,5 +124,5 @@ RSpec::Matchers.define :have_a_form do
|
|
124
124
|
end
|
125
125
|
ret
|
126
126
|
end
|
127
|
-
|
127
|
+
failure_message_when_negated { "expected not to find a form on the page" }
|
128
128
|
end
|
data/lib/fracture/version.rb
CHANGED
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fracture
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.12.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Nigel Rausch
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-02-11 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: nokogiri
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ! '>='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ! '>='
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: inflections
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ! '>='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ! '>='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rspec
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ! '>='
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ! '>='
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rake
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ! '>='
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ! '>='
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -99,27 +90,26 @@ files:
|
|
99
90
|
- spec/matcher_spec.rb
|
100
91
|
homepage: ''
|
101
92
|
licenses: []
|
93
|
+
metadata: {}
|
102
94
|
post_install_message:
|
103
95
|
rdoc_options: []
|
104
96
|
require_paths:
|
105
97
|
- lib
|
106
98
|
required_ruby_version: !ruby/object:Gem::Requirement
|
107
|
-
none: false
|
108
99
|
requirements:
|
109
100
|
- - ! '>='
|
110
101
|
- !ruby/object:Gem::Version
|
111
102
|
version: '0'
|
112
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
104
|
requirements:
|
115
105
|
- - ! '>='
|
116
106
|
- !ruby/object:Gem::Version
|
117
107
|
version: '0'
|
118
108
|
requirements: []
|
119
109
|
rubyforge_project: fracture
|
120
|
-
rubygems_version:
|
110
|
+
rubygems_version: 2.4.5
|
121
111
|
signing_key:
|
122
|
-
specification_version:
|
112
|
+
specification_version: 4
|
123
113
|
summary: Unified View testing within Views or Controllers for RSpec
|
124
114
|
test_files:
|
125
115
|
- spec/fracture_spec.rb
|