-
-
Save caffo/5672cebddc34d395c9a7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require 'spec_helper' | |
describe City do | |
it { should respond_to(:name) } | |
it { should respond_to(:friendly_id) } | |
context 'when validating' do | |
it 'is invalid without a name' do | |
city = build(:city, :name => nil) | |
city.should_not be_valid | |
city.should have(1).error_on(:name) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment