我期待在执行rspec
期间在我的控制台中打开一个pry会话。我做错了吗?或者期待错误的行为?
的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)
规格:
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
控制台:
% rspec
...
Failed examples:
...
Randomized with seed 59654