Sha256: 4181d20a50314c04a5ab2048ecc8d157d1c3d0b9812335ece727d3279ecfff69

Contents?: true

Size: 289 Bytes

Versions: 9

Compression:

Stored size: 289 Bytes

Contents

require "metamorpher"

class RefactorWhereFirstNotCalledExpectations
  include Metamorpher::Refactorer
  include Metamorpher::Builders::Ruby

  def pattern
    builder.build("TYPE.expects(:where).never")
  end

  def replacement
    builder.build("TYPE.expects(:find_by).never")
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
metamorpher-0.2.6 examples/refactorings/rails/where_first/refactorers/refactor_where_first_not_called_expectations.rb
metamorpher-0.2.5 examples/refactorings/rails/where_first/refactorers/refactor_where_first_not_called_expectations.rb
metamorpher-0.2.4 examples/refactorings/rails/where_first/refactorers/refactor_where_first_not_called_expectations.rb
metamorpher-0.2.3 examples/refactorings/rails/where_first/refactorers/refactor_where_first_not_called_expectations.rb
metamorpher-0.2.2 examples/refactorings/rails/where_first/refactorers/refactor_where_first_not_called_expectations.rb
metamorpher-0.2.1 examples/refactorings/rails/where_first/refactorers/refactor_where_first_not_called_expectations.rb
metamorpher-0.2.0 examples/refactorings/rails/where_first/refactorers/refactor_where_first_not_called_expectations.rb
metamorpher-0.1.1 examples/refactorings/rails/where_first/refactorers/refactor_where_first_not_called_expectations.rb
metamorpher-0.1.0 examples/refactorings/rails/where_first/refactorers/refactor_where_first_not_called_expectations.rb