Sha256: 94989a8da4aea4c7c88dae498052e7d6a5253cded228b12c3e2c4a02206f14b5

Contents?: true

Size: 951 Bytes

Versions: 58

Compression:

Stored size: 951 Bytes

Contents

# encoding: utf-8
require 'spec_helper'
require 'fedux_org_stdlib/fixtures_management'

RSpec.describe FixturesManagement::FixturesManager do

  describe '#load_fixtures' do
    let(:creator_stub) { Class.new }
    let(:creator) { stub_const('FeduxOrgStdlib::FixturesManagement::Fixture', creator_stub) }

    it 'load fixtures from path' do
      expect(creator).to receive(:new).with(Pathname.new(absolute_path('images-app')))

      touch_file 'images-app/image1.png'
      touch_file 'images-app/image2.png'

      manager = FixturesManagement::FixturesManager.new
      manager.load_fixtures(absolute_path('.'))
    end
  end

  describe '#find' do
    it 'find fixture' do
      touch_file 'images-app/image1.png'
      touch_file 'images-app/image2.png'

      manager = FixturesManagement::FixturesManager.new
      manager.load_fixtures(absolute_path('.'))

      expect(manager.find('images-app').name).to eq :'images-app'
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.11.18 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.11.17 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.11.16 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.11.15 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.11.14 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.11.12 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.11.11 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.11.9 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.11.8 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.11.7 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.11.6 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.11.5 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.11.4 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.11.3 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.11.2 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.11.1 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.11.0 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.10.9 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.10.8 spec/fixtures_management/fixtures_manager_spec.rb
fedux_org-stdlib-0.10.7 spec/fixtures_management/fixtures_manager_spec.rb