stuffer 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.
- data/lib/stuffer/version.rb +1 -1
- data/lib/stuffer.rb +5 -1
- data/lib/teststuff/Gemfile +1 -1
- data/lib/teststuff/spec/features/stuffer_spec.rb +21 -0
- metadata +3 -3
data/lib/stuffer/version.rb
CHANGED
data/lib/stuffer.rb
CHANGED
@@ -113,7 +113,11 @@ module Stuffer
|
|
113
113
|
end
|
114
114
|
end
|
115
115
|
|
116
|
-
def self.stuff
|
116
|
+
def self.stuff(*args)
|
117
|
+
args.each do |arg|
|
118
|
+
remove = convert arg
|
119
|
+
@id.delete(remove)
|
120
|
+
end
|
117
121
|
@id.each do |stuff|
|
118
122
|
if @capy_fields[stuff] == 'input' && @fields[stuff] != false && @fields[stuff] != true
|
119
123
|
fill stuff
|
data/lib/teststuff/Gemfile
CHANGED
@@ -89,6 +89,27 @@ describe 'stuffing' do
|
|
89
89
|
expect(info.wage).to eql(1)
|
90
90
|
end
|
91
91
|
|
92
|
+
it "doesn't fill in a field if you pass it as an argument to stuff" do
|
93
|
+
visit new_user_path
|
94
|
+
Stuffer.factorize :user
|
95
|
+
Stuffer.stuff :email
|
96
|
+
click_on 'Create User'
|
97
|
+
|
98
|
+
user = User.last
|
99
|
+
expect(user.email).to eql("")
|
100
|
+
end
|
101
|
+
|
102
|
+
it "doesn't fill in multiple fields if you pass in multiple arguments" do
|
103
|
+
visit new_user_path
|
104
|
+
Stuffer.factorize :user
|
105
|
+
Stuffer.stuff :email, :food
|
106
|
+
click_on 'Create User'
|
107
|
+
|
108
|
+
user = User.last
|
109
|
+
expect(user.email).to eql("")
|
110
|
+
expect(user.food).to eql(nil)
|
111
|
+
end
|
112
|
+
|
92
113
|
|
93
114
|
|
94
115
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stuffer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -264,7 +264,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
264
264
|
version: '0'
|
265
265
|
segments:
|
266
266
|
- 0
|
267
|
-
hash: -
|
267
|
+
hash: -1907500722259530662
|
268
268
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
269
269
|
none: false
|
270
270
|
requirements:
|
@@ -273,7 +273,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
273
273
|
version: '0'
|
274
274
|
segments:
|
275
275
|
- 0
|
276
|
-
hash: -
|
276
|
+
hash: -1907500722259530662
|
277
277
|
requirements: []
|
278
278
|
rubyforge_project:
|
279
279
|
rubygems_version: 1.8.25
|