Created
May 30, 2013 14:24
-
-
Save bill-transue/5678234 to your computer and use it in GitHub Desktop.
Is this dumb?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shared_examples_for 'a contact' do |options={}| | |
it { should be_a(Contact) } | |
its(:first_name) { should ==(first_name) } | |
its(:last_name) { should ==(last_name) } | |
its(:email) { should ==(email) } | |
unless options[:except_a_phone_number] | |
it "should scrape the phone number" do | |
subject.extended_contact_data_attributes[:phone_numbers].first[:value].should ==(phone_number) | |
end | |
end | |
end | |
describe ProcessorJob | |
context "of something without a phone number" do | |
subject { ProcessorJob...} | |
it_should_return 'a contact', :except_a_phone_number => true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment