spec/integration/readme/number_spec.rb in danica-2.7.4 vs spec/integration/readme/number_spec.rb in danica-2.7.5
- old
+ new
@@ -1,18 +1,20 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe Danica::Wrapper::Number do
- let(:number) do
- Danica::Wrapper::Number.new(3)
- end
-
subject do
Danica::DSL.build do
number(3)
end
end
+ let(:number) do
+ described_class.new(3)
+ end
+
it do
expect(subject).to eq(number)
end
describe 'from basic operation' do
@@ -23,18 +25,17 @@
end
let(:expected) do
Danica::Operator::Addition.new(
Danica::Operator::Power.new(
- Danica::Wrapper::Variable.new(:x),
- Danica::Wrapper::Number.new(2)
+ Danica::Wrapper::Variable.new(:x),
+ described_class.new(2)
),
- Danica::Wrapper::Number.new(3)
+ described_class.new(3)
)
end
it do
expect(sum).to eq(expected)
end
end
end
-