7

I am expecting a pry session to be opened in my console during execution of rspec. Am I doing something incorrect? Or expecting the wrong behavior?

Gemfile:

group :development, :test do
  gem 'rspec'
  gem 'rspec-rails'
  ...
  gem 'pry-rails'
  ...
end

Gemfile.lock:

...
pry (0.10.0)
...
rspec-rails (3.0.1)

spec:

require 'rails_helper'

RSpec.describe Account, type: :model, do
  let!(:acct) { FactoryGirl.create(:account) }

  describe '#hash' do
    it 'should ...' do
      acct.property = 5
      binding.pry
      expect(acct).to_not be_nil
    end
  end

end

console:

% rspec
...
Failed examples: 
...
Randomized with seed 59654
Dave Schweisguth
  • 36,475
  • 10
  • 98
  • 121
Eric Francis
  • 23,039
  • 31
  • 88
  • 122

0 Answers0