spec/support/shared/examples/search_with.rb in metasploit-model-0.30.0-java vs spec/support/shared/examples/search_with.rb in metasploit-model-0.30.1.pre.rspec.pre.3.pre.1
- old
+ new
@@ -1,13 +1,13 @@
-shared_examples_for 'search_with' do |operation_class, options={}|
+RSpec.shared_examples_for 'search_with' do |operation_class, options={}|
name = options.fetch(:name)
- context name do
+ context name.to_s do
subject(:with_operator) do
base_class.search_with_operator_by_name[name]
end
- it { should be_a operation_class }
+ it { is_expected.to be_a operation_class }
options.each do |key, value|
# skip :name since it use used to look up operator, so it's already been checked or with_operator would be `nil`
unless key == :name
it "has #{key.inspect} of #{value.inspect}" do
\ No newline at end of file