Sha256: a8ed9c437d224426994455f43d935371851b4fab8dc11e5145f2ba3c33cd48af

Contents?: true

Size: 478 Bytes

Versions: 2

Compression:

Stored size: 478 Bytes

Contents

require 'spec_helper'

describe Zertico::Service do
  describe '#initialize' do
    context 'with a custom controller' do
      it 'should save the name based on the controller name' do
        expect(Zertico::Service.new('UsersController').name).to eq('UsersService')
      end
    end

    context 'without a custom controller' do
      it 'should save the name of the service' do
        expect(Zertico::Service.new.name).to eq('Zertico::Service')
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
zertico-2.0.0.beta.1 spec/zertico/service_spec.rb
zertico-2.0.0.alpha.3 spec/zertico/service_spec.rb