Sha256: ab5b566cec94f696eb532ff6797700865bacb2caf033a4367f19c021342904a5
Contents?: true
Size: 718 Bytes
Versions: 1
Compression:
Stored size: 718 Bytes
Contents
# frozen_string_literal: true require 'ego/capability' RSpec.describe Ego::Capability do let(:desc) { 'my desc' } let(:plugin) { double('Ego::Plugin') } describe '#initialize' do it 'sets its description' do allow(Ego::Plugin).to receive(:context) { plugin } subject = described_class.new(desc) expect(subject.desc).to eq(desc) end it 'sets the plug-in context' do allow(Ego::Plugin).to receive(:context) { plugin } subject = described_class.new(desc) expect(subject.plugin).to be plugin end end describe '#to_s' do it 'returns the description' do subject = described_class.new(desc) expect(subject.to_s).to eq(desc) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ego-0.6.0 | spec/ego/capability_spec.rb |