Sha256: 4f78965a4e2b3ead8bb8fffd71100d3fc112854f3c4944a62c432ce382282a74

Contents?: true

Size: 712 Bytes

Versions: 40

Compression:

Stored size: 712 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 a file" do
      repo = Expressir::ExpressExp::Parser.from_exp(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", "remark.exp"
    )
  end

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

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
expressir-0.2.9-arm64-darwin spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.8 spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.8-x86_64-linux spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.8-x86_64-darwin spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.8-x86-mingw32 spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.8-x86-linux spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.8-x64-mingw32 spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.8-arm64-darwin spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.7 spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.7-x86-mingw32 spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.7-x64-mingw32 spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.7-x86_64-linux spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.7-x86-linux spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.7-x86_64-darwin spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.7-arm64-darwin spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.5-x86_64-linux spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.5-x86_64-darwin-19 spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.5 spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.4 spec/expressir/express_exp/format_remark_spec.rb
expressir-0.2.3 spec/expressir/express_exp/format_remark_spec.rb