conformity 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.
- checksums.yaml +4 -4
- data/lib/conformity/form.rb +6 -0
- data/lib/conformity/version.rb +1 -1
- data/spec/form_spec.rb +18 -0
- 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: 011dcfc1a2e284d37c12b61ed27df6e0c76a25ef
|
4
|
+
data.tar.gz: 26b680569448f9dd54a27343a1fb5c19018e60b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85cc2036f76c48e0e97bc065bee20c972bb82f6e8fae30244e8cde9d64e5ba8499a95a5440eef27b79fcaa89f22e905688bd5346a023fbdc6a0f8a480e4626ac
|
7
|
+
data.tar.gz: 6a916d04c39029fce898126e76fe1b8d22d658c20d36c26bcc0f0b7232fa22cb4415ffb6949d292a370fb7261b10ce6e7fef29e6605f75ed77e43c65afec03e6
|
data/lib/conformity/form.rb
CHANGED
@@ -58,6 +58,12 @@ module Conformity
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
+
# When passing a block to iniatialize using instance_eval the Kernel#select
|
62
|
+
# method gets called instead of method_missing
|
63
|
+
def select(*args, &block)
|
64
|
+
method_missing(:select, *args, &block)
|
65
|
+
end
|
66
|
+
|
61
67
|
def actions
|
62
68
|
@actions ||= []
|
63
69
|
end
|
data/lib/conformity/version.rb
CHANGED
data/spec/form_spec.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require_relative 'spec_helper'
|
2
2
|
require 'conformity/form'
|
3
|
+
require 'debugger'
|
3
4
|
|
4
5
|
|
5
6
|
describe Conformity::Form do
|
@@ -7,6 +8,23 @@ describe Conformity::Form do
|
|
7
8
|
@form = Form.new
|
8
9
|
end
|
9
10
|
|
11
|
+
describe '#initialize' do
|
12
|
+
it 'can initialize with a block' do
|
13
|
+
expect do
|
14
|
+
Form.new do
|
15
|
+
visit '/page'
|
16
|
+
find 'element'
|
17
|
+
fill_in 'fill_in', with: field(:field_one)
|
18
|
+
select field(:field_two)
|
19
|
+
choose field(:field_three)
|
20
|
+
check 'box'
|
21
|
+
uncheck 'box'
|
22
|
+
click_on 'button'
|
23
|
+
end
|
24
|
+
end.to_not raise_error
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
10
28
|
describe '#field' do
|
11
29
|
it 'should return a field' do
|
12
30
|
expect(@form.field(:name)).to be_instance_of Field
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conformity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikias Kalpaxis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|