Sha256: 380d6238f5289e4ddc932a9ad93034bbd1b759badab28dbd7cc44de362019d32
Contents?: true
Size: 579 Bytes
Versions: 2
Compression:
Stored size: 579 Bytes
Contents
require 'spec_helper' describe Charger::Customer do subject { Charger::Customer.new } describe 'fields' do it { should respond_to :id } it { should respond_to :first_name } it { should respond_to :last_name } end describe '#persisted?' do context 'when the id is set' do before { subject.id = 1 } it 'should return true' do expect(subject.persisted?).to eq(true) end end context 'when the id is not set' do it 'should return false' do expect(subject.persisted?).to eq(false) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
charger-0.2.0 | spec/charger/customer_spec.rb |
charger-0.1.1 | spec/charger/customer_spec.rb |