Sha256: 09ed9fa3a60c50f08e5e6d9d38bbbd9dec7f01c70738e7758aa4ba8f2f07e20b
Contents?: true
Size: 718 Bytes
Versions: 9
Compression:
Stored size: 718 Bytes
Contents
require "helper" RSpec.describe Affirm::SuccessResult do let(:object) { double(:object, id: 1, amount: 500, void: false) } subject { described_class.new(object) } it "should be successful" do expect(subject).to be_success end it "should have id" do expect(subject.id).to eq(object.id) end it "should have amount" do expect(subject.amount).to eq(object.amount) end it "should not be voided" do expect(subject.void).to be_falsey end it "should raise no method error on missing method" do expect { subject.does_not_exist }.to raise_error(NoMethodError) end it "should not respond to missing method" do expect(subject).not_to respond_to(:does_not_exist) end end
Version data entries
9 entries across 9 versions & 1 rubygems