Source

RubyCSharp / RSpec_samples / spec / user_spec.rb

Full commit
require './user'

describe User do

  describe "Doctor" do
    subject { User.new 'doctor' }
    it { should be_doctor }
    it { should_not be_patient }
  end

  describe "Patient" do
    subject { User.new 'patient' }
    it { should be_patient }
    it { should_not be_doctor }
  end
  
  describe "Nurse" do
    subject { User.new 'nurse' }
    it { should be_nurse }
    it { should_not be_doctor }
  end
end