Sha256: 84f10b6ecbe44924bb8d43c9e08723cb98eb49f32f7b38e233ad0a69b77dec58

Contents?: true

Size: 597 Bytes

Versions: 29

Compression:

Stored size: 597 Bytes

Contents

module CustomMatchers
  class ConvertMatcher
    def initialize(value)
      puts "asdfaj;lskdfj;lkasjdf;a"
      @value_to_convert = value
    end

    def matches?(actual)
      puts "**********************"
      result = actual.convert(@value_to_convert)
      unless defined?(@expected_value)
        false
      end
      #result.eql?(@expected_value)
      false
    end

    def to(expected)
      @expected_value = expected
    end

    def description
      "convert #{@value_to_convert} to #{@expected_value}"
    end
  end

  def convert(value)
    ConvertMatcher.new(value)
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
ninja-model-1.0.5 spec/support/matchers/convert.rb
ninja-model-1.0.4 spec/support/matchers/convert.rb
ninja-model-1.0.3 spec/support/matchers/convert.rb
ninja-model-1.0.2 spec/support/matchers/convert.rb
ninja-model-1.0.1 spec/support/matchers/convert.rb
ninja-model-1.0.0 spec/support/matchers/convert.rb
ninja-model-0.9.6 spec/support/matchers/convert.rb
ninja-model-0.9.5 spec/support/matchers/convert.rb
ninja-model-0.9.4 spec/support/matchers/convert.rb
ninja-model-0.9.3 spec/support/matchers/convert.rb
ninja-model-0.9.2 spec/support/matchers/convert.rb
ninja-model-0.9.1 spec/support/matchers/convert.rb
ninja-model-0.9.0 spec/support/matchers/convert.rb
ninja-model-0.8.1 spec/support/matchers/convert.rb
ninja-model-0.8.0 spec/support/matchers/convert.rb
ninja-model-0.7.3 spec/support/matchers/convert.rb
ninja-model-0.7.2 spec/support/matchers/convert.rb
ninja-model-0.7.1 spec/support/matchers/convert.rb
ninja-model-0.7.0 spec/support/matchers/convert.rb
ninja-model-0.6.2 spec/support/matchers/convert.rb