Sha256: f421cc18967d7c87b34fe1bccfc05cd45ba9058931be04e23f17512cdf6204b1

Contents?: true

Size: 527 Bytes

Versions: 3

Compression:

Stored size: 527 Bytes

Contents

require 'spec_helper'

shared_examples 'Strategy' do
  let :env do
    Rack::MockRequest.env_for('http://example.com/some/path?and=query')
  end

  describe '.new' do
    it 'takes a options as argument' do
      options = { option_1: true, option_2: false }
      strategy = described_class.new(options)
      expect(strategy.options).to eq options
    end
  end

  describe '#process' do
    it 'raises without block given' do
      expect { described_class.new.process(env) }.to raise_error LocalJumpError
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rack-encoding_guard-0.1.2 spec/support/shared_examples_for_strategy.rb
rack-encoding_guard-0.1.1 spec/support/shared_examples_for_strategy.rb
rack-encoding_guard-0.1.0 spec/support/shared_examples_for_strategy.rb