Sha256: 393c6c2158a07c947944f64e526aaca5e1387cd7b417bb0c0a2c53e37a67f59b

Contents?: true

Size: 593 Bytes

Versions: 17

Compression:

Stored size: 593 Bytes

Contents

require 'spec_helper'

module Locator; end
require 'cucumber/pickles/locator/index'
require 'cucumber/pickles/locator/equal'

RSpec.describe "#Locator" do

  describe "#Index" do

    it 'returns correct index xpath with index' do
      locator, index = Locator::Index.execute('locator[1]')

      expect(index).to eq 1
      expect(locator).to eq 'locator'
    end

    it 'returns empty without index' do
      locator, index = Locator::Index.execute('locator')

      expect(index).to be_nil
      expect(locator).to eq 'locator'
    end

  end

  describe "#Equal" do
    # ???
  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
pickles-0.2.4 spec/locator_spec.rb
pickles-0.2.3 spec/locator_spec.rb
pickles-0.2.2 spec/locator_spec.rb
pickles-0.2.1 spec/locator_spec.rb
pickles-0.2.0 spec/locator_spec.rb
pickles-0.1.12 spec/locator_spec.rb
pickles-0.1.10 spec/locator_spec.rb
pickles-0.1.9 spec/locator_spec.rb
pickles-0.1.8 spec/locator_spec.rb
pickles-0.1.7 spec/locator_spec.rb
pickles-0.1.6 spec/locator_spec.rb
pickles-0.1.5 spec/locator_spec.rb
pickles-0.1.4 spec/locator_spec.rb
pickles-0.1.3 spec/locator_spec.rb
pickles-0.1.2 spec/locator_spec.rb
pickles-0.1.1 spec/locator_spec.rb
pickles-0.1.0 spec/locator_spec.rb