[rspec-users] [Newbie's Doubt] Model's Tests
lucianosantosborges at gmail.com
Wed Apr 18 00:50:57 UTC 2012
I'm studying Rspec and doing some model's tests.
I have a table with a field which must have two characters, the field
should not be empty and can not be repeated.
My doubts is with #.
describe State do
context "validations" do
it "The abbreviation should not be empty" do
subject.abbreviation = nil
*# I can do like example below or I have to break in parts?*
it "The abbreviation should have 2 characters" do
subject.abbreviation = "BA"
subject.abbreviation = "B"
subject.abbreviation = "BAA"
it "The abbreviation can not be repeated" do
* # I don't know how to do!*
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users