spec/lib/danica/operator_spec.rb in danica-2.6.4 vs spec/lib/danica/operator_spec.rb in danica-2.7.1
- old
+ new
@@ -1,14 +1,20 @@
require 'spec_helper'
class Danica::Operator::Dummy < Danica::Operator
variables :a, :b
+
+ def to(*args)
+ a + b
+ end
end
describe Danica::Operator do
let(:variables) { [2, 4] }
let(:clazz) { described_class::Dummy }
subject { clazz.new(*variables) }
+
+ it_behaves_like 'an object that respond to basic_methods'
describe 'variables assignment' do
it 'assignes the variables tpo its places' do
expect(subject.a).to eq(Danica::Wrapper::Number.new(2))
expect(subject.b).to eq(Danica::Wrapper::Number.new(4))