spec/unit/assertion/base_spec.rb in assertion-0.2.2 vs spec/unit/assertion/base_spec.rb in assertion-0.2.3
- old
+ new
@@ -52,11 +52,11 @@
describe "#message" do
let(:klass) { Class.new(described_class) { attribute :foo } }
let(:assertion) { klass.new(foo: :FOO) }
- shared_examples "translating" do |as: nil|
+ shared_examples "translating" do |options|
let(:translator) { Assertion::Translator.new(klass) }
let(:attributes) { assertion.attributes }
it "uses attributes in a translation" do
@@ -65,10 +65,10 @@
end
subject
end
it "returns a translation" do
- expect(subject).to eql translator.call(as, attributes)
+ expect(subject).to eql translator.call(options[:as], attributes)
end
end # shared examples
it_behaves_like "translating", as: true do