Sha256: 335c4e8eba53b8c759d7247abf6ec9b05f30f262f744f9b3c2212544c376307a

Contents?: true

Size: 713 Bytes

Versions: 35

Compression:

Stored size: 713 Bytes

Contents

require "spec_helper"
require "expressir/express_exp/parser"
require "expressir/express_exp/formatter"

RSpec.describe Expressir::ExpressExp::Formatter do
  describe ".format" do
    it "formats syntax" do
      repo = Expressir::ExpressExp::Parser.from_file(input_file)

      result = Expressir::ExpressExp::Formatter.format(repo)
      expected_result = File.read(output_file)

      expect(result).to eq(expected_result)
    end
  end

  def input_file
    @input_file ||= Expressir.root_path.join(
      "original", "examples", "syntax", "syntax.exp"
    )
  end

  def output_file
    @output_file ||= Expressir.root_path.join(
      "original", "examples", "syntax", "syntax_formatted.exp"
    )
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
expressir-0.2.16 spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.16-x86_64-linux spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.16-x86_64-darwin spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.16-x86-mingw32 spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.16-x86-linux spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.16-x64-mingw32 spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.16-arm64-darwin spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.15 spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.15-x86_64-linux spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.15-x86_64-darwin spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.15-x86-mingw32 spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.15-x86-linux spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.15-x64-mingw32 spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.15-arm64-darwin spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.14 spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.14-x86_64-linux spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.14-x86_64-darwin spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.14-x86-mingw32 spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.14-x86-linux spec/expressir/express_exp/formatter/syntax_spec.rb
expressir-0.2.14-x64-mingw32 spec/expressir/express_exp/formatter/syntax_spec.rb