enumerated_attribute 0.2.8 → 0.2.10
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/enumerated_attribute/rails_helpers.rb +1 -0
- data/spec/poro_spec.rb +12 -0
- metadata +2 -2
data/spec/poro_spec.rb
CHANGED
@@ -182,6 +182,18 @@ describe "Tractor" do
|
|
182
182
|
t.respond_to?(:gear_is_in_high?).should be_false
|
183
183
|
end
|
184
184
|
|
185
|
+
it "should return true when calling respond_to? for :gear_is_in_neutral? with an optional argument" do
|
186
|
+
t=Tractor.new
|
187
|
+
t.respond_to?(:gear_is_in_neutral?, true).should be_true
|
188
|
+
t.respond_to?(:gear_is_in_neutral?, false).should be_true
|
189
|
+
end
|
190
|
+
|
191
|
+
it "should return true when called respond_to? for :gear_is_in_high? with an optional argument" do
|
192
|
+
t=Tractor.new
|
193
|
+
t.respond_to?(:gear_is_in_high?, true).should be_false
|
194
|
+
t.respond_to?(:gear_is_in_high?, false).should be_false
|
195
|
+
end
|
196
|
+
|
185
197
|
it "should initially set :plow to :up" do
|
186
198
|
t=Tractor.new
|
187
199
|
t.plow.should == :up
|