binding.pry被rspec忽略

时间:2014-06-19 16:38:01

标签: rspec rspec-rails pry rspec3 pry-rails

我期待在执行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

0 个答案:

没有答案