Sha256: 75c7e1fd78a1eb70edc434a1d36a172d8a4368e2850616cd60d215d0abcd2a18

Contents?: true

Size: 634 Bytes

Versions: 86

Compression:

Stored size: 634 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

module Synvert::Core
  describe Rewriter::RubyVersion do
    before do
      expect(File).to receive(:exist?).with('./.ruby-version').and_return(true)
      expect(File).to receive(:read).with('./.ruby-version').and_return('3.0.0')
    end

    it 'returns true if ruby version is greater than 1.9' do
      ruby_version = Rewriter::RubyVersion.new('1.9')
      expect(ruby_version).to be_match
    end

    it 'returns false if ruby version is less than 19.0' do
      ruby_version = Rewriter::RubyVersion.new('19.0')
      expect(ruby_version).not_to be_match
    end
  end
end

Version data entries

86 entries across 86 versions & 1 rubygems

Version Path
synvert-core-0.58.3 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-0.58.2 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-0.58.0 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-0.57.1 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-0.57.0 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-0.56.1 spec/synvert/core/rewriter/ruby_version_spec.rb