spec/lib/tarquinn/condition/action_checker_spec.rb in tarquinn-0.2.0 vs spec/lib/tarquinn/condition/action_checker_spec.rb in tarquinn-0.3.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'spec_helper' describe Tarquinn::Condition::ActionChecker do let(:dummy_controller) { Tarquinn::DummyController.new } let(:controller) { Tarquinn::Controller.new(dummy_controller) } @@ -32,20 +34,20 @@ end end end context 'when initialized with more routes' do - let(:routes) { [:show, :view] } + let(:routes) { %i[show view] } let(:subject) { described_class.new(routes) } context 'when receiving a request for one of the given action' do it do expect(subject.check?(controller)).to be_truthy end end context 'when receiving a request for another action' do - let(:routes) { [:update, :view] } + let(:routes) { %i[update view] } it do expect(subject.check?(controller)).to be_falsey end end end