Displaying 1 result from an estimated 1 matches for "check_empty_shirt_fields".
2014 Feb 11
0
Cucumber test question
...taff info record$/) do |arg1|
assert_difference('StaffInfo.count', 1) do
@staff_info = FactoryGirl.create :staff_info
end
end
When(/^the shirt size field is empty$/) do
assert @staff_info.update_attribute(:shirt_size, nil)
end
When(/^the shirt size check is run$/) do
StaffInfo.check_empty_shirt_fields
end
Then(/^the system should send an email notification$/) do
pending # express the regexp above with the code you wish you had
end
Model:
class StaffInfo < ActiveRecord::Base
belongs_to :person
scope :empty_shirt_fields, -> { where('shirt_size in (?)', [nil, '']) }...