Sha256: eeebd7af7749c228ab88fa97db4b0858a31433749d5ef33a3cc2ab4dac47a3fe

Contents?: true

Size: 562 Bytes

Versions: 5

Compression:

Stored size: 562 Bytes

Contents

require 'spec_helper'
require 'howitzer/web/element_dsl'

RSpec.describe Howitzer::Web::ElementDsl do
  let(:klass) do
    Class.new do
      include Howitzer::Web::ElementDsl
      def capybara_scopes
        @_scopes ||= [Capybara.current_session]
      end
    end
  end
  let(:klass_object) { klass.new }

  it 'returns correct capybara context' do
    allow(Capybara).to receive(:current_session) { 'session' }
    expect(klass_object.capybara_context).to eq('session')
  end

  include_examples :element_dsl
  include_examples :capybara_context_holder
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
howitzer-2.1.1 spec/unit/lib/web/element_dsl_spec.rb
howitzer-2.1.0 spec/unit/lib/web/element_dsl_spec.rb
howitzer-2.0.3 spec/unit/lib/web/element_dsl_spec.rb
howitzer-2.0.2 spec/unit/lib/web/element_dsl_spec.rb
howitzer-2.0.1 spec/unit/lib/web/element_dsl_spec.rb