Top "Rspec3" questions

RSpec 3 is a major release of the Behaviour-Driven Development tool for Ruby programmers.

How to raise an exception in an RSpec test

I'm stuck on a test scenario. I have a controller method: def update @object = Object.find params[:id] # some other …

ruby-on-rails ruby rspec rspec3
Test if a block is passed with RSpec Mocks

I can test if arguments are passed like: RSpec.describe do it do obj = double expect(obj).to receive(:method).…

ruby rspec rspec3
What is the difference between "be_true" and "be true" in RSpec

Can any one please explain me about the difference between be_true and be true in Ruby with simple example. …

ruby-on-rails ruby rspec rspec3
How to set a value in the params hash when testing a Rails helper method with RSpec?

In Ruby on Rails 4, with RSpec 3.1, how do I set the values of the params hash when testing a Rails …

ruby-on-rails ruby-on-rails-4 rspec rspec-rails rspec3
Getting 'Bad value for range' in RSpec

Here is my code: #app/models/user.rb class User < ActiveRecord::Base def display_name name.split(' ').…

ruby-on-rails ruby rspec rspec3