Sha256: 18b1304032a52c270a8653062dfe6c8817689b4995245d0e0bec1714306f9b59

Contents?: true

Size: 1 KB

Versions: 12

Compression:

Stored size: 1 KB

Contents

require 'spec_helper'

module Cucumber
  describe Runtime::ForProgrammingLanguages do

    let(:user_interface)  { double('user interface') }
    subject               { Runtime::SupportCode.new(user_interface,{}) }
    let(:runtime_facade)  { Runtime::ForProgrammingLanguages.new(subject, user_interface) }

    describe "#doc_string" do

      it 'defaults to a blank content-type' do
        str = runtime_facade.doc_string('DOC')
        expect(str).to be_kind_of(MultilineArgument::DocString)
        expect(str.content_type).to eq('')
      end

      it 'can have a content type' do
        str = runtime_facade.doc_string('DOC','ruby')
        expect(str.content_type).to eq('ruby')
      end

    end

    describe "#table" do

      it 'produces Ast::Table by #table' do
        expect(runtime_facade.table(%{
      | account | description | amount |
      | INT-100 | Taxi        | 114    |
      | CUC-101 | Peeler      | 22     |
        })).to be_kind_of(MultilineArgument::DataTable)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cucumber-2.1.0 spec/cucumber/runtime/for_programming_languages_spec.rb
cucumber-2.0.2 spec/cucumber/runtime/for_programming_languages_spec.rb
cucumber-2.0.1 spec/cucumber/runtime/for_programming_languages_spec.rb
cucumber-2.0.0 spec/cucumber/runtime/for_programming_languages_spec.rb
cucumber-2.0.0.rc.5 spec/cucumber/runtime/for_programming_languages_spec.rb
cucumber-2.0.0.rc.4 spec/cucumber/runtime/for_programming_languages_spec.rb
cucumber-2.0.0.rc.3 spec/cucumber/runtime/for_programming_languages_spec.rb
cucumber-2.0.0.rc.2 spec/cucumber/runtime/for_programming_languages_spec.rb
cucumber-2.0.0.rc.1 spec/cucumber/runtime/for_programming_languages_spec.rb
cucumber-2.0.0.beta.5 spec/cucumber/runtime/for_programming_languages_spec.rb
cucumber-2.0.0.beta.4 spec/cucumber/runtime/for_programming_languages_spec.rb
cucumber-2.0.0.beta.3 spec/cucumber/runtime/for_programming_languages_spec.rb