Sha256: 5cee3c9e906e75b391492462953be524b386235874c5451f5ab03a87068908da
Contents?: true
Size: 923 Bytes
Versions: 5
Compression:
Stored size: 923 Bytes
Contents
# frozen_string_literal: true # Load the class under test require_relative '../../../lib/zenlish/inflect/method_heading' module Zenlish module Inflect describe MethodHeading do let(:method_name) { 'base_form' } subject { MethodHeading.new(method_name) } context 'Initialization:' do it 'should be initialized with a method name' do expect { MethodHeading.new(method_name) }.not_to raise_error end it 'should know its label' do expect(subject.label).to eq(method_name) end end # context context 'Provided services:' do it 'should obtain the method result from a word' do mocked = double('dummy-lexeme') expect(mocked).to receive(:base_form).and_return('cherry') expect(subject.evaluate_for(mocked)).to eq('cherry') end end # context end # describe end # module end # module
Version data entries
5 entries across 5 versions & 1 rubygems