Sha256: 6f312399ba68aa3a7a019ca6f715d3d223442b241be4e66497e290f1cb1028ca

Contents?: true

Size: 602 Bytes

Versions: 6

Compression:

Stored size: 602 Bytes

Contents

require 'spec_helper'

describe Apiary::Command::Preview do

  let(:command) do
    opts = {
      path: "#{File.expand_path File.dirname(__FILE__)}/../../features/fixtures/apiary.apib"
    }
    Apiary::Command::Preview.new(opts)
  end

  it 'check tmp path if contains filename' do
    expect(command.preview_path()).to end_with('apiary-preview.html')
  end

  it 'shoud contain html5 doctype' do
    expect(command.generate()).to include('<!DOCTYPE html>')
  end

  it 'should contain embed javascript' do
    expect(command.generate()).to include('https://api.apiary.io/seeds/embed.js')
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
apiaryio-0.3.5 spec/command/preview_spec.rb
apiaryio-0.3.4 spec/command/preview_spec.rb
apiaryio-0.3.3 spec/command/preview_spec.rb
apiaryio-0.3.2 spec/command/preview_spec.rb
apiaryio-0.3.1 spec/command/preview_spec.rb
apiaryio-0.3.0 spec/command/preview_spec.rb