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-1.30.1 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.30.0 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.29.4 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.29.3 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.29.2 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.29.1 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.29.0 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.28.5 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.28.4 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.28.3 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.28.2 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.28.1 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.28.0 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.27.1 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.27.0 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.26.3 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.26.2 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.26.1 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.26.0 spec/synvert/core/rewriter/ruby_version_spec.rb
synvert-core-1.25.0 spec/synvert/core/rewriter/ruby_version_spec.rb