Tags » Rspec 2

RSpec - Controller Specs, What in the World?!?!

Last week I spent 4 full (and I mean FULL) days learning about controller specs, writing controller specs, and talking at length with other students about controller specs for my… 1,466 more words

Rails

RSpec : Matcher : Difference between 'eq' and 'equal' matchers

a.equal?(b) # object identity – a and b refer to the same object
a.eql?(b) # object equivalence – a and b have the same value… 39 more words

Ruby On Rails

RSpec : Ruby On Rails : Different behavior of symbol/string in describe : TDD

Lets see the following example and understand how writing a ruby symbol instead a string make difference in describe block of RSpec.

RSpec.describe Applicant, type: :model do
  describe 'Validation' do
    it { is_expected.to validate_presence_of(:first_name) }
    it { is_expected.to validate_presence_of(:last_name) }
    it { is_expected.to validate_presence_of(:email) }
  end
end

Outputs
 should require first_name to be set
 should require last_name to be set
 should require email to be set

… 101 more words
Ruby On Rails

Add Additional Library to Faker :: RSpec :: TDD

Suppose you are working on a project in which you want to test a Applicant Model. Applicant may have any value among options in a drop-down. 87 more words

Ruby On Rails