danica 2.7.4 → 2.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.circleci/config.yml +28 -0
- data/.gitignore +6 -1
- data/.rubocop.yml +9 -0
- data/.rubocop_todo.yml +100 -0
- data/Dockerfile +26 -0
- data/Gemfile +2 -1
- data/Rakefile +4 -0
- data/config/rubycritc.rb +12 -0
- data/config/yardstick.rb +13 -0
- data/config/yardstick.yml +33 -0
- data/danica.gemspec +14 -7
- data/docker-compose.yml +14 -9
- data/lib/danica.rb +2 -1
- data/lib/danica/base_operations.rb +2 -0
- data/lib/danica/builder.rb +2 -0
- data/lib/danica/common.rb +5 -2
- data/lib/danica/dsl.rb +8 -6
- data/lib/danica/dsl/builder.rb +3 -1
- data/lib/danica/equation.rb +3 -3
- data/lib/danica/equation/builder.rb +2 -0
- data/lib/danica/exception.rb +3 -2
- data/lib/danica/expressable.rb +14 -8
- data/lib/danica/expression.rb +4 -2
- data/lib/danica/expression/gauss.rb +5 -5
- data/lib/danica/formatted.rb +4 -2
- data/lib/danica/function.rb +5 -3
- data/lib/danica/function/name.rb +2 -0
- data/lib/danica/operator.rb +12 -9
- data/lib/danica/operator/addition.rb +4 -3
- data/lib/danica/operator/chained.rb +4 -3
- data/lib/danica/operator/cos.rb +2 -1
- data/lib/danica/operator/division.rb +2 -1
- data/lib/danica/operator/exponential.rb +2 -1
- data/lib/danica/operator/functional.rb +3 -2
- data/lib/danica/operator/multiplication.rb +4 -2
- data/lib/danica/operator/power.rb +4 -3
- data/lib/danica/operator/sin.rb +2 -1
- data/lib/danica/operator/squared_root.rb +2 -1
- data/lib/danica/variables_holder.rb +7 -4
- data/lib/danica/variables_holder/alias_builder.rb +4 -4
- data/lib/danica/variables_holder/calculator.rb +2 -0
- data/lib/danica/variables_holder/store.rb +3 -2
- data/lib/danica/variables_holder/variables_builder.rb +2 -1
- data/lib/danica/version.rb +3 -1
- data/lib/danica/wrapper.rb +11 -9
- data/lib/danica/wrapper/constant.rb +9 -14
- data/lib/danica/wrapper/container.rb +2 -3
- data/lib/danica/wrapper/group.rb +2 -2
- data/lib/danica/wrapper/negative.rb +2 -1
- data/lib/danica/wrapper/number.rb +4 -3
- data/lib/danica/wrapper/plus_minus.rb +2 -1
- data/lib/danica/wrapper/variable.rb +10 -8
- data/scripts/check_readme.sh +6 -0
- data/scripts/rubycritic.sh +10 -0
- data/spec/integration/global/danica/formatted_spec.rb +87 -0
- data/spec/integration/global/danica/operator/addition_spec.rb +32 -0
- data/spec/integration/{multiplication_spec.rb → global/danica/operator/multiplication_spec.rb} +12 -9
- data/spec/integration/{power_spec.rb → global/danica/operator/power_spec.rb} +4 -2
- data/spec/integration/{negative_spec.rb → global/danica/wrapper/negative_spec.rb} +9 -8
- data/spec/integration/{plus_minus_spec.rb → global/danica/wrapper/plus_minus_spec.rb} +5 -4
- data/spec/integration/readme/constant_spec.rb +4 -1
- data/spec/integration/readme/danica/formatted_spec.rb +24 -0
- data/spec/integration/readme/danica_spec.rb +20 -4
- data/spec/integration/readme/equation_spec.rb +4 -2
- data/spec/integration/readme/expression_spec.rb +11 -8
- data/spec/integration/readme/function_spec.rb +11 -7
- data/spec/integration/readme/number_spec.rb +9 -8
- data/spec/integration/readme/operator_spec.rb +3 -1
- data/spec/integration/readme/variables_spec.rb +8 -6
- data/spec/lib/danica/common_spec.rb +23 -9
- data/spec/lib/danica/dsl_spec.rb +5 -2
- data/spec/lib/danica/equation_spec.rb +10 -8
- data/spec/lib/danica/expressable_spec.rb +5 -2
- data/spec/lib/danica/expression/gauss_spec.rb +6 -3
- data/spec/lib/danica/expression_spec.rb +48 -26
- data/spec/lib/danica/formatted_spec.rb +20 -14
- data/spec/lib/danica/function/name_spec.rb +3 -1
- data/spec/lib/danica/function_spec.rb +14 -10
- data/spec/lib/danica/operator/addition_spec.rb +16 -15
- data/spec/lib/danica/operator/cos_spec.rb +9 -8
- data/spec/lib/danica/operator/division_spec.rb +18 -17
- data/spec/lib/danica/operator/exponential_spec.rb +9 -8
- data/spec/lib/danica/operator/multiplication_spec.rb +16 -15
- data/spec/lib/danica/operator/power_spec.rb +17 -16
- data/spec/lib/danica/operator/sin_spec.rb +9 -8
- data/spec/lib/danica/operator/squared_root_spec.rb +9 -8
- data/spec/lib/danica/operator_spec.rb +13 -4
- data/spec/lib/danica/variables_holder/store_spec.rb +19 -13
- data/spec/lib/danica/variables_holder_spec.rb +76 -59
- data/spec/lib/danica/wrapper/constant_spec.rb +9 -2
- data/spec/lib/danica/wrapper/group_spec.rb +4 -1
- data/spec/lib/danica/wrapper/negative_spec.rb +4 -1
- data/spec/lib/danica/wrapper/number_spec.rb +8 -3
- data/spec/lib/danica/wrapper/plus_minus_spec.rb +4 -1
- data/spec/lib/danica/wrapper/variable_spec.rb +6 -3
- data/spec/lib/danica/wrapper_spec.rb +14 -12
- data/spec/lib/danica_spec.rb +6 -5
- data/spec/spec_helper.rb +2 -1
- data/spec/support/models/expression/baskara.rb +3 -3
- data/spec/support/models/expression/parabole.rb +2 -0
- data/spec/support/models/expression/quadratic_sum.rb +3 -1
- data/spec/support/models/expression/spatial.rb +2 -1
- data/spec/support/models/function/my_function.rb +3 -1
- data/spec/support/models/function/parabole.rb +1 -1
- data/spec/support/models/function/quadratic_sum.rb +2 -0
- data/spec/support/models/function/spatial.rb +2 -0
- data/spec/support/models/operator/inverse.rb +3 -1
- data/spec/support/models/operator/my_operator.rb +3 -1
- data/spec/support/models/variables_holder/dummy.rb +3 -1
- data/spec/support/shared_contexts/common.rb +4 -2
- data/spec/support/shared_examples/base_operations.rb +7 -4
- data/spec/support/shared_examples/common.rb +3 -1
- data/spec/support/shared_examples/operator/chained.rb +12 -6
- data/spec/support/shared_examples/operator/dual_term.rb +9 -8
- data/spec/support/shared_examples/operator/single_input.rb +7 -2
- data/spec/support/shared_examples/variable.rb +8 -4
- metadata +109 -30
- data/spec/integration/addition_spec.rb +0 -28
- data/spec/integration/formatted_spec.rb +0 -75
- data/spec/integration/readme/formatting_spec.rb +0 -34
@@ -1,9 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe Danica::Wrapper::Negative do
|
4
|
-
let(:value) { 10 }
|
5
6
|
subject { described_class.new(value) }
|
6
7
|
|
8
|
+
let(:value) { 10 }
|
9
|
+
|
7
10
|
it_behaves_like 'an object that respond to basic_methods'
|
8
11
|
it_behaves_like 'an object with basic operation'
|
9
12
|
|
@@ -1,20 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe Danica::Wrapper::Number do
|
4
|
-
let(:value) { 10 }
|
5
6
|
subject { described_class.new(value) }
|
6
7
|
|
8
|
+
let(:value) { 10 }
|
9
|
+
|
7
10
|
it_behaves_like 'an object that respond to basic_methods'
|
8
11
|
|
9
12
|
it_behaves_like 'an object with basic operation'
|
10
13
|
|
11
14
|
describe '#valued?' do
|
12
15
|
context 'when value is present' do
|
13
|
-
it { expect(subject
|
16
|
+
it { expect(subject).to be_valued }
|
14
17
|
end
|
18
|
+
|
15
19
|
context 'when value is not present' do
|
16
20
|
let(:value) { false }
|
17
|
-
|
21
|
+
|
22
|
+
it { expect(subject).not_to be_valued }
|
18
23
|
end
|
19
24
|
end
|
20
25
|
|
@@ -1,9 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe Danica::Wrapper::PlusMinus do
|
4
|
-
let(:value) { 10 }
|
5
6
|
subject { described_class.new(value) }
|
6
7
|
|
8
|
+
let(:value) { 10 }
|
9
|
+
|
7
10
|
it_behaves_like 'an object that respond to basic_methods'
|
8
11
|
it_behaves_like 'an object with basic operation'
|
9
12
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe Danica::Wrapper::Variable do
|
@@ -10,13 +12,13 @@ describe Danica::Wrapper::Variable do
|
|
10
12
|
it 'can be initialize from nil value' do
|
11
13
|
expect do
|
12
14
|
described_class.new(nil)
|
13
|
-
end
|
15
|
+
end.not_to raise_error
|
14
16
|
end
|
15
17
|
|
16
18
|
it 'can be initialize from nil name' do
|
17
19
|
expect do
|
18
20
|
described_class.new(name: nil)
|
19
|
-
end
|
21
|
+
end.not_to raise_error
|
20
22
|
end
|
21
23
|
|
22
24
|
describe '#to_f' do
|
@@ -25,9 +27,10 @@ describe Danica::Wrapper::Variable do
|
|
25
27
|
end
|
26
28
|
|
27
29
|
context 'when variable has value' do
|
28
|
-
let(:value) { 100 }
|
29
30
|
subject { described_class.new(value: value) }
|
30
31
|
|
32
|
+
let(:value) { 100 }
|
33
|
+
|
31
34
|
it 'returns the value' do
|
32
35
|
expect(subject.to_f).to eq(value)
|
33
36
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
class Danica::Wrapper::Dummy
|
@@ -24,21 +26,21 @@ shared_examples 'a value wrapper' do |examples|
|
|
24
26
|
end
|
25
27
|
|
26
28
|
describe Danica::Wrapper do
|
27
|
-
let(:clazz) { described_class::Dummy }
|
28
29
|
subject { clazz.new(value) }
|
29
30
|
|
31
|
+
let(:clazz) { described_class::Dummy }
|
32
|
+
|
30
33
|
describe 'wrap_value' do
|
31
|
-
it_behaves_like 'a value wrapper',
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
}
|
34
|
+
it_behaves_like 'a value wrapper',
|
35
|
+
x: Danica::Wrapper::Variable,
|
36
|
+
'x' => Danica::Wrapper::Variable,
|
37
|
+
10 => Danica::Wrapper::Number,
|
38
|
+
10.5 => Danica::Wrapper::Number,
|
39
|
+
-10 => Danica::Wrapper::Negative,
|
40
|
+
{ name: :x } => Danica::Wrapper::Variable,
|
41
|
+
{ value: 10, latex: :x, gnuplot: :X } => Danica::Wrapper::Constant,
|
42
|
+
Danica::Wrapper::Variable.new(:x).tex => Danica::Wrapper::Variable,
|
43
|
+
Danica.build(:x) { x } => Danica::Expression
|
42
44
|
|
43
45
|
context 'when value is non accepted' do
|
44
46
|
let(:value) { Object.new }
|
data/spec/lib/danica_spec.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe Danica do
|
@@ -10,13 +12,13 @@ describe Danica do
|
|
10
12
|
end
|
11
13
|
|
12
14
|
it 'returns the expected addition' do
|
13
|
-
expect(result.expression_block).to eq(Danica::Operator::Addition.new(1,2))
|
15
|
+
expect(result.expression_block).to eq(Danica::Operator::Addition.new(1, 2))
|
14
16
|
end
|
15
17
|
end
|
16
18
|
|
17
19
|
context 'when creating a power of addition and multiplication' do
|
18
20
|
let(:block) do
|
19
|
-
proc { power(addition(1, 2), multiplication(2,3)) }
|
21
|
+
proc { power(addition(1, 2), multiplication(2, 3)) }
|
20
22
|
end
|
21
23
|
let(:expected) do
|
22
24
|
Danica::Operator::Power.new(
|
@@ -70,7 +72,7 @@ describe Danica do
|
|
70
72
|
|
71
73
|
context 'when defining a negative output' do
|
72
74
|
let(:block) do
|
73
|
-
proc { -
|
75
|
+
proc { -sum(2, 3) }
|
74
76
|
end
|
75
77
|
|
76
78
|
let(:expected) do
|
@@ -83,7 +85,7 @@ describe Danica do
|
|
83
85
|
expect(result.expression_block).to eq(expected)
|
84
86
|
end
|
85
87
|
|
86
|
-
context '
|
88
|
+
context 'when it is a number' do
|
87
89
|
let(:block) do
|
88
90
|
proc { -num(2) }
|
89
91
|
end
|
@@ -99,4 +101,3 @@ describe Danica do
|
|
99
101
|
end
|
100
102
|
end
|
101
103
|
end
|
102
|
-
|
data/spec/spec_helper.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'simplecov'
|
2
4
|
|
3
5
|
SimpleCov.profiles.define 'gem' do
|
@@ -8,7 +10,6 @@ SimpleCov.start 'gem'
|
|
8
10
|
require 'pry-nav'
|
9
11
|
require 'danica'
|
10
12
|
|
11
|
-
|
12
13
|
# This file was generated by the `rspec --init` command. Conventionally, all
|
13
14
|
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
14
15
|
# Require this file using `require "spec_helper"` to ensure that it is only
|
@@ -1,10 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Danica
|
2
4
|
class Expression::Baskara < Expression.build(:a, :b, :c) { numerator / denominator }
|
3
|
-
|
4
5
|
private
|
5
6
|
|
6
7
|
def numerator
|
7
|
-
|
8
|
+
negative(b) + Wrapper::PlusMinus.new(squared_root(delta))
|
8
9
|
end
|
9
10
|
|
10
11
|
def denominator
|
@@ -16,4 +17,3 @@ module Danica
|
|
16
17
|
end
|
17
18
|
end
|
18
19
|
end
|
19
|
-
|
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class Danica::Operator::Inverse < Danica::Operator
|
2
4
|
variables :value
|
3
5
|
|
4
6
|
def to_f
|
5
|
-
value.to_f
|
7
|
+
value.to_f**-1 # Do not worry with nil value as this has been implemented already raising Danica::Exception::NotDefined
|
6
8
|
end
|
7
9
|
|
8
10
|
def to_tex
|
@@ -1,5 +1,7 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
shared_context 'when variables are initialized' do |arguments, *names|
|
2
4
|
names.each do |key|
|
3
|
-
let(key) { arguments[key.to_sym]
|
5
|
+
let(key) { arguments[key.to_sym] }
|
4
6
|
end
|
5
7
|
end
|
@@ -1,5 +1,7 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
shared_examples 'an object with basic operation' do |operations: %i[+ - * / **], ignore: []|
|
4
|
+
(operations - [ignore].flatten).each do |operation|
|
3
5
|
it_behaves_like "an object with #{operation} operation"
|
4
6
|
end
|
5
7
|
end
|
@@ -25,6 +27,7 @@ shared_examples 'an object with + operation' do
|
|
25
27
|
|
26
28
|
context 'when operating as reverse' do
|
27
29
|
let(:result) { Danica::Wrapper::Number.new(other) + subject }
|
30
|
+
|
28
31
|
it_behaves_like 'an object with an operation', Danica::Operator::Addition
|
29
32
|
end
|
30
33
|
end
|
@@ -38,6 +41,7 @@ shared_examples 'an object with * operation' do
|
|
38
41
|
|
39
42
|
context 'when operating as reverse' do
|
40
43
|
let(:result) { Danica::Wrapper::Number.new(other) * subject }
|
44
|
+
|
41
45
|
it_behaves_like 'an object with an operation', Danica::Operator::Multiplication
|
42
46
|
end
|
43
47
|
end
|
@@ -77,7 +81,7 @@ end
|
|
77
81
|
|
78
82
|
shared_examples 'an object with ** operation' do
|
79
83
|
let(:other) { 104 }
|
80
|
-
let(:result) { subject
|
84
|
+
let(:result) { subject**other }
|
81
85
|
|
82
86
|
it { expect(result).to be_a(Danica::Operator::Power) }
|
83
87
|
|
@@ -89,4 +93,3 @@ shared_examples 'an object with ** operation' do
|
|
89
93
|
expect(result.exponent).to eq(Danica::Wrapper::Number.new(other))
|
90
94
|
end
|
91
95
|
end
|
92
|
-
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
shared_examples 'an object that respond to basic_methods' do |ignore: [], methods: %i[to_f to_tex to_gnu priority valued? container? variable? variable_holder?]|
|
2
4
|
(methods - ignore).each do |method|
|
3
5
|
it { expect(subject).to respond_to(method) }
|
4
6
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
shared_examples 'a operator that joins many variables with same operation' do |arguments|
|
2
4
|
it_behaves_like 'a operator that knows how to calculate', arguments
|
3
5
|
it_behaves_like 'a operator that knows how to write to tex', arguments
|
@@ -5,14 +7,15 @@ shared_examples 'a operator that joins many variables with same operation' do |a
|
|
5
7
|
end
|
6
8
|
|
7
9
|
shared_examples 'a operator that knows how to calculate' do |arguments|
|
8
|
-
include_context 'variables are initialized', arguments, 'calculated'
|
10
|
+
include_context 'when variables are initialized', arguments, 'calculated'
|
11
|
+
subject { described_class.new(*variables) }
|
12
|
+
|
9
13
|
let(:variables) do
|
10
14
|
(1..4).map do |i|
|
11
|
-
{ name: "X#{i}", value: numeric_variables[i-1] }
|
15
|
+
{ name: "X#{i}", value: numeric_variables[i - 1] }
|
12
16
|
end
|
13
17
|
end
|
14
|
-
let(:numeric_variables){ (1..4).to_a }
|
15
|
-
subject { described_class.new(*variables) }
|
18
|
+
let(:numeric_variables) { (1..4).to_a }
|
16
19
|
|
17
20
|
describe 'to_f' do
|
18
21
|
it 'returns the addition of variables value' do
|
@@ -46,10 +49,11 @@ shared_examples 'a operator that knows how to write to gnu' do |arguments|
|
|
46
49
|
end
|
47
50
|
|
48
51
|
shared_examples 'a operator that knows how to write to a string' do |format, arguments|
|
49
|
-
let(:numeric_variables) { arguments[:numeric_variables] }
|
50
|
-
include_context 'variables are initialized', arguments[format], *%w(integer_expected string_expected float_expected)
|
51
52
|
subject { described_class.new(*variables) }
|
52
53
|
|
54
|
+
let(:numeric_variables) { arguments[:numeric_variables] }
|
55
|
+
include_context 'when variables are initialized', arguments[format], 'integer_expected', 'string_expected', 'float_expected'
|
56
|
+
|
53
57
|
describe "#to(#{format})" do
|
54
58
|
let(:variables) do
|
55
59
|
(1..4).map { |i| "X#{i}" }
|
@@ -63,6 +67,7 @@ shared_examples 'a operator that knows how to write to a string' do |format, arg
|
|
63
67
|
|
64
68
|
context 'when some variables have values' do
|
65
69
|
let(:numeric_variables_index) { 1 }
|
70
|
+
|
66
71
|
before do
|
67
72
|
(0..numeric_variables_index).each do |i|
|
68
73
|
subject.variables[i].value = numeric_variables[i]
|
@@ -84,6 +89,7 @@ shared_examples 'a operator that knows how to write to a string' do |format, arg
|
|
84
89
|
|
85
90
|
context 'when some variables are numbers' do
|
86
91
|
let(:numeric_variables_index) { 1 }
|
92
|
+
|
87
93
|
before do
|
88
94
|
(0..numeric_variables_index).each do |i|
|
89
95
|
variables[i] = numeric_variables[i]
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
shared_examples 'a operator that has two terms' do |name, arguments|
|
2
4
|
it_behaves_like 'a operator that has two terms and knows how to calculate it', name, arguments
|
3
5
|
it_behaves_like 'a operator that has two terms and knows how to call to_tex', arguments
|
@@ -5,11 +7,11 @@ shared_examples 'a operator that has two terms' do |name, arguments|
|
|
5
7
|
end
|
6
8
|
|
7
9
|
shared_examples 'a operator that has two terms and knows how to calculate it' do |name, arguments|
|
8
|
-
include_context 'variables are initialized', arguments,
|
10
|
+
include_context 'when variables are initialized', arguments, 'values', 'calculated'
|
9
11
|
|
10
12
|
let(:variables) do
|
11
|
-
[
|
12
|
-
{ name: "X#{i}", value: values[i-1] }
|
13
|
+
[1, 2].map do |i|
|
14
|
+
{ name: "X#{i}", value: values[i - 1] }
|
13
15
|
end
|
14
16
|
end
|
15
17
|
|
@@ -63,17 +65,17 @@ end
|
|
63
65
|
shared_examples 'a operator that has two terms and knows how to return a string out of it' do |command, arguments|
|
64
66
|
let(:values) { arguments[:values] }
|
65
67
|
|
66
|
-
include_context 'variables are initialized', arguments[command],
|
68
|
+
include_context 'when variables are initialized', arguments[command], 'string_expected', 'numeric_string_expected', 'partial_string_expected'
|
67
69
|
describe "##{command}" do
|
68
70
|
let(:variables) do
|
69
|
-
[
|
70
|
-
{ name: "X#{i}", value: values[i-1] }
|
71
|
+
[1, 2].map do |i|
|
72
|
+
{ name: "X#{i}", value: values[i - 1] }
|
71
73
|
end
|
72
74
|
end
|
73
75
|
|
74
76
|
context 'when variables have no value' do
|
75
77
|
let(:variables) do
|
76
|
-
[
|
78
|
+
[1, 2].map { |i| "X#{i}" }
|
77
79
|
end
|
78
80
|
|
79
81
|
it 'returns a text format fraction' do
|
@@ -109,4 +111,3 @@ shared_examples 'a operator that has two terms and knows how to return a string
|
|
109
111
|
end
|
110
112
|
end
|
111
113
|
end
|
112
|
-
|