6

我期望在执行rspec. 我做错了什么吗?还是期待错误的行为?

宝石文件:

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
4

0 回答 0