Sha256: 65d58fab474f406dae67cbc2f03797c7649ada2a5ea6e5676c19c918bab7d474

Contents?: true

Size: 683 Bytes

Versions: 4

Compression:

Stored size: 683 Bytes

Contents

RSpec.describe Aldous::Respondable::Headable do
  subject(:headable) {described_class.new(status, view_data, view_context)}

  let(:status) {:foo}
  let(:view_data) {double("view_data")}
  let(:view_context) {double("view context")}

  describe "::action" do
    let(:controller) {double("controller")}

    it "returns a head response action object" do
      expect(headable.action(controller)).to be_kind_of Aldous::Respondable::Headable::HeadAction
    end

    it 'creates a head response action with the relevant parameters' do
      expect(Aldous::Respondable::Headable::HeadAction).to receive(:new).with(controller, status)
      headable.action(controller)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
aldous-1.1.3 spec/aldous/respondable/headable_spec.rb
aldous-1.1.2 spec/aldous/respondable/headable_spec.rb
aldous-1.0.1 spec/aldous/respondable/headable_spec.rb
aldous-1.0.0 spec/aldous/respondable/headable_spec.rb