spec/lib/danica/equation_spec.rb in danica-2.7.4 vs spec/lib/danica/equation_spec.rb in danica-2.7.5
- old
+ new
@@ -1,36 +1,38 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe Danica::Equation do
+ subject do
+ clazz.new
+ end
+
let(:clazz) do
described_class.build(:x, :y) do
left { y }
- right { x ** 2 }
+ right { x**2 }
end
end
- subject do
- clazz.new
- end
-
it_behaves_like 'an object that respond to basic_methods'
describe '.build' do
it 'returns a class that is also an equation' do
- expect(subject).to be_a(Danica::Equation)
+ expect(subject).to be_a(described_class)
end
end
describe '.create' do
subject do
described_class.create(:x, :y) do
left { y }
- right { x ** 2 }
+ right { x**2 }
end
end
it 'returns a class that is also an equation' do
- expect(subject).to be_a(Danica::Equation)
+ expect(subject).to be_a(described_class)
end
end
describe '#to_f' do
it do