spec/tram/policy/error_spec.rb in tram-policy-1.0.1 vs spec/tram/policy/error_spec.rb in tram-policy-2.0.0

- old
+ new

@@ -1,12 +1,13 @@ RSpec.describe Tram::Policy::Error do subject(:error) { described_class.new :bad, options } - let(:options) { { level: "warning", scope: %w[tram-policy] } } + let(:scope) { %w[tram-policy] } + let(:options) { { level: "warning", scope: scope } } describe "#item" do subject { error.item } - it { is_expected.to eq [:bad, level: "warning", scope: %w[tram-policy]] } + it { is_expected.to eq [:bad, level: "warning", scope: scope] } end describe "#message" do subject { error.message } it { is_expected.to eq "Something bad has happened" }