diff options
Diffstat (limited to 'spec/change_spec.rb')
-rw-r--r-- | spec/change_spec.rb | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/spec/change_spec.rb b/spec/change_spec.rb index b8d3443..42533ae 100644 --- a/spec/change_spec.rb +++ b/spec/change_spec.rb @@ -1,89 +1,89 @@ # frozen_string_literal: true -require 'spec_helper' +require "spec_helper" describe Diff::LCS::Change do - describe 'an add' do - subject { described_class.new('+', 0, 'element') } - it { should_not be_deleting } - it { should be_adding } - it { should_not be_unchanged } - it { should_not be_changed } + describe "an add" do + subject { described_class.new("+", 0, "element") } + it { should_not be_deleting } + it { should be_adding } + it { should_not be_unchanged } + it { should_not be_changed } it { should_not be_finished_a } it { should_not be_finished_b } end - describe 'a delete' do - subject { described_class.new('-', 0, 'element') } - it { should be_deleting } - it { should_not be_adding } - it { should_not be_unchanged } - it { should_not be_changed } + describe "a delete" do + subject { described_class.new("-", 0, "element") } + it { should be_deleting } + it { should_not be_adding } + it { should_not be_unchanged } + it { should_not be_changed } it { should_not be_finished_a } it { should_not be_finished_b } end - describe 'an unchanged' do - subject { described_class.new('=', 0, 'element') } - it { should_not be_deleting } - it { should_not be_adding } - it { should be_unchanged } - it { should_not be_changed } + describe "an unchanged" do + subject { described_class.new("=", 0, "element") } + it { should_not be_deleting } + it { should_not be_adding } + it { should be_unchanged } + it { should_not be_changed } it { should_not be_finished_a } it { should_not be_finished_b } end - describe 'a changed' do - subject { described_class.new('!', 0, 'element') } - it { should_not be_deleting } - it { should_not be_adding } - it { should_not be_unchanged } - it { should be_changed } + describe "a changed" do + subject { described_class.new("!", 0, "element") } + it { should_not be_deleting } + it { should_not be_adding } + it { should_not be_unchanged } + it { should be_changed } it { should_not be_finished_a } it { should_not be_finished_b } end - describe 'a finished_a' do - subject { described_class.new('>', 0, 'element') } - it { should_not be_deleting } - it { should_not be_adding } - it { should_not be_unchanged } - it { should_not be_changed } - it { should be_finished_a } + describe "a finished_a" do + subject { described_class.new(">", 0, "element") } + it { should_not be_deleting } + it { should_not be_adding } + it { should_not be_unchanged } + it { should_not be_changed } + it { should be_finished_a } it { should_not be_finished_b } end - describe 'a finished_b' do - subject { described_class.new('<', 0, 'element') } - it { should_not be_deleting } - it { should_not be_adding } - it { should_not be_unchanged } - it { should_not be_changed } + describe "a finished_b" do + subject { described_class.new("<", 0, "element") } + it { should_not be_deleting } + it { should_not be_adding } + it { should_not be_unchanged } + it { should_not be_changed } it { should_not be_finished_a } - it { should be_finished_b } + it { should be_finished_b } end - describe 'as array' do - it 'should be converted' do - action, position, element = described_class.new('!', 0, 'element') - expect(action).to eq '!' + describe "as array" do + it "should be converted" do + action, position, element = described_class.new("!", 0, "element") + expect(action).to eq "!" expect(position).to eq 0 - expect(element).to eq 'element' + expect(element).to eq "element" end end end describe Diff::LCS::ContextChange do - describe 'as array' do - it 'should be converted' do + describe "as array" do + it "should be converted" do action, (old_position, old_element), (new_position, new_element) = - described_class.new('!', 1, 'old_element', 2, 'new_element') + described_class.new("!", 1, "old_element", 2, "new_element") - expect(action).to eq '!' + expect(action).to eq "!" expect(old_position).to eq 1 - expect(old_element).to eq 'old_element' + expect(old_element).to eq "old_element" expect(new_position).to eq 2 - expect(new_element).to eq 'new_element' + expect(new_element).to eq "new_element" end end end |