Sha256: 4018b75df348124e1a5f00870c056459773aec4c9d8400587c81eb8d17439c24

Contents?: true

Size: 751 Bytes

Versions: 12

Compression:

Stored size: 751 Bytes

Contents

require 'spec_helper'
require 'wlang/command'
module WLang
  describe "The examples", :hash_ordering => true do

    (root_folder/"examples/1-html-intro").glob("**/*.*").each do |ex_file|
      next if ex_file.basename.to_s == "README.md"
      describe "the example file #{ex_file}" do

        let(:command) do
          cmd = WLang::Command.new
          def cmd.with_output(&proc); proc.call(""); end
          cmd
        end

        let(:expected) do
          from, to = root_folder, Path.dir
          (to/(ex_file % from)).rm_ext
        end

        it 'is instantiated as expected with autospacing' do
          got = command.run ["--auto-spacing", ex_file]
          got.should eq(expected.read)
        end

      end
    end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
wlang-3.0.1 spec/integration/test_examples.rb
wlang-3.0.0 spec/integration/test_examples.rb
wlang-2.3.1 spec/integration/test_examples.rb
wlang-2.3.0 spec/integration/test_examples.rb
wlang-2.2.4 spec/integration/test_examples.rb
wlang-2.2.3 spec/integration/test_examples.rb
wlang-2.2.2 spec/integration/test_examples.rb
wlang-2.2.1 spec/integration/test_examples.rb
wlang-2.2.0 spec/integration/test_examples.rb
wlang-2.1.2 spec/integration/test_examples.rb
wlang-2.1.1 spec/integration/test_examples.rb
wlang-2.1.0 spec/integration/test_examples.rb