Skip to content

Commit

Permalink
Replace should with expect
Browse files Browse the repository at this point in the history
MSP-12566
  • Loading branch information
limhoff-r7 committed Apr 16, 2015
1 parent bb7ff9c commit 6a4f96c
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions spec/metasploit/erd/cluster_spec.rb
Expand Up @@ -149,8 +149,8 @@
[]
end

it { should be_a Set }
it { should be_empty }
it { is_expected.to be_a Set }
it { is_expected.to be_empty }
end
end
end
30 changes: 15 additions & 15 deletions spec/metasploit/erd/diagram_spec.rb
Expand Up @@ -13,18 +13,18 @@
RailsERD::Domain.new
}

it { should be_a RailsERD::Diagram::Graphviz }
it { is_expected.to be_a RailsERD::Diagram::Graphviz }

context 'CONSTANTS' do
context 'ATTRIBUTES' do
subject(:attributes) {
described_class::ATTRIBUTES
}

it { should include :content }
it { should include :foreign_keys }
it { should include :primary_keys }
it { should include :timestamps }
it { is_expected.to include :content }
it { is_expected.to include :foreign_keys }
it { is_expected.to include :primary_keys }
it { is_expected.to include :timestamps }
end

context 'DEFAULT_OPTIONS' do
Expand Down Expand Up @@ -98,39 +98,39 @@
described_class::FILETYPE
}

it { should == :png }
it { is_expected.to eq(:png) }
end

context 'INDIRECT' do
subject(:indirect) {
described_class::INDIRECT
}

it { should eq(false) }
it { is_expected.to eq(false) }
end

context 'INHERITANCE' do
subject(:inheritance) {
described_class::INHERITANCE
}

it { should eq(true) }
it { is_expected.to eq(true) }
end

context 'NOTATION' do
subject(:notation) {
described_class::NOTATION
}

it { should == :crowsfoot }
it { is_expected.to eq(:crowsfoot) }
end

context 'POLYMORPHISM' do
subject(:polymorphism) {
described_class::POLYMORPHISM
}

it { should eq(true) }
it { is_expected.to eq(true) }
end
end

Expand All @@ -144,7 +144,7 @@
callbacks[:each_entity]
}

it { should_not be_nil }
it { is_expected.to_not be_nil }

it 'uses RailsERD::Diagram::Graphviz.callbacks[:each_entity]' do
expect(each_entity).to eq(RailsERD::Diagram::Graphviz.send(:callbacks)[:each_entity])
Expand All @@ -156,7 +156,7 @@
callbacks[:each_relationship]
}

it { should_not be_nil }
it { is_expected.to_not be_nil }

it 'uses RailsERD::Diagram::Graphviz.callbacks[:each_relationship]' do
expect(each_relationship).to eq(RailsERD::Diagram::Graphviz.send(:callbacks)[:each_relationship])
Expand All @@ -168,7 +168,7 @@
callbacks[:each_specialization]
}

it { should_not be_nil }
it { is_expected.to_not be_nil }

it 'uses RailsERD::Diagram::Graphviz.callbacks[:each_specialization]' do
expect(each_specialization).to eq(RailsERD::Diagram::Graphviz.send(:callbacks)[:each_specialization])
Expand All @@ -180,7 +180,7 @@
callbacks[:save]
}

it { should_not be_nil }
it { is_expected.to_not be_nil }

it 'extends RailsERD::Diagram::Graphviz.callbacks[:save]' do
expect(save).not_to eq(RailsERD::Diagram::Graphviz.send(:callbacks)[:save])
Expand All @@ -192,7 +192,7 @@
callbacks[:setup]
}

it { should_not be_nil }
it { is_expected.to_not be_nil }

it 'uses RailsERD::Diagram::Graphviz.callbacks[:setup]' do
expect(setup).to eq(RailsERD::Diagram::Graphviz.send(:callbacks)[:setup])
Expand Down
2 changes: 1 addition & 1 deletion spec/metasploit/erd/entity/class_spec.rb
Expand Up @@ -216,7 +216,7 @@
end

context 'without belongs_to associations' do
it { should be_empty }
it { is_expected.to be_empty }
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/metasploit/erd/entity/namespace_spec.rb
Expand Up @@ -105,7 +105,7 @@
end

context 'without ActiveRecord::Base descendants' do
it { should be_empty }
it { is_expected.to be_empty }
end
end

Expand Down
6 changes: 3 additions & 3 deletions spec/metasploit/erd/relationship_spec.rb
Expand Up @@ -73,7 +73,7 @@
end
end

it { should be_a Set }
it { is_expected.to be_a Set }

it 'includes association.klass' do
expect(class_set).to include(association.klass)
Expand Down Expand Up @@ -135,7 +135,7 @@
end
end

it { should be_a Set }
it { is_expected.to be_a Set }

it 'includes all classes that have has_many <inverse>, as: <reflection.name>' do
expect(class_set).to eq(Set.new(things))
Expand Down Expand Up @@ -223,7 +223,7 @@
end
end

it { should be_a Set }
it { is_expected.to be_a Set }

context 'with has_many as: <association.name>' do
it 'includes classes' do
Expand Down
4 changes: 2 additions & 2 deletions spec/metasploit/erd/version_spec.rb
Expand Up @@ -17,15 +17,15 @@
described_class::MINOR
end

it { should be_a Integer }
it { is_expected.to be_a Integer }
end

context 'PATCH' do
subject(:patch) do
described_class::PATCH
end

it { should be_a Integer }
it { is_expected.to be_a Integer }
end

pull_request = ENV['TRAVIS_PULL_REQUEST']
Expand Down
4 changes: 2 additions & 2 deletions spec/support/shared/examples/metasploit/erd/clusterable.rb
Expand Up @@ -68,7 +68,7 @@ def self.table_name_prefix
[]
}

it { should be_a Metasploit::ERD::Diagram }
it { is_expected.to be_a Metasploit::ERD::Diagram }

context 'Metasploit::ERD::Diagram#create' do
subject(:create) {
Expand Down Expand Up @@ -256,7 +256,7 @@ def self.table_name_prefix
options[:title]
}

it { should be_a String }
it { is_expected.to be_a String }
end
end
end
Expand Down

0 comments on commit 6a4f96c

Please sign in to comment.