Sha256: bd738eafb4ba2e0e7bcdd3f710132917defd8ae8bda4a22df53130b8e5c4d8da

Contents?: true

Size: 733 Bytes

Versions: 2

Compression:

Stored size: 733 Bytes

Contents

require 'spec_helper'

describe Microscope::InstanceMethod do
  describe :ClassMethods do
    describe :past_participle_to_infinitive do
      before do
        Microscope.configure do |config|
          config.special_verbs = { 'started' => 'start', 'foo' => 'bar', 'canceled' => 'cancel' }
        end
      end

      let(:past_participles) { ['liked', 'loved', 'gateway_canceled', 'started', 'fed', 'foo'] }
      let(:infinitives) { ['like', 'love', 'gateway_cancel', 'start', 'feed', 'bar'] }
      let(:mapped_past_participles) { past_participles.map { |v| Microscope::InstanceMethod.past_participle_to_infinitive(v) } }

      specify do
        expect(mapped_past_participles).to eql infinitives
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
microscope-0.6.1 spec/microscope/instance_method_spec.rb
microscope-0.6 spec/microscope/instance_method_spec.rb