Sha256: 6d0204851cd7d90b9c59f4fc321e504096cbe1f67a59f3d555894b1f064832ee

Contents?: true

Size: 766 Bytes

Versions: 3

Compression:

Stored size: 766 Bytes

Contents

require 'spec_helper'
require_relative 'support/test_app'

RSpec.describe Yaks::Format::HTML, type: :yaks_integration do
  before do
    Capybara.app = TestApp
  end

  let(:rel_prefix) { 'http://myapi.example.com/rel/' }

  it 'should allow browsing the api' do
    visit '/'

    expect(page).to have_content 'GET /'
    expect(page).to have_content 'generated with Yaks'

    click_rel('friends')

    expect(current_path).to eql '/friends'

    expect(page).to have_content 'GET /friends'
    expect(page).to have_content 'Matt'

    submit_form(:poke) do
      fill_in :message, with: 'Free the means of production'
    end

    expect(current_path).to eql '/poke/Matt'

    expect(page).to have_content 'You poked Matt: Free the means of production'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yaks-html-0.13.0 spec/smoke_test_spec.rb
yaks-html-0.12.0 spec/smoke_test_spec.rb
yaks-html-0.11.0 spec/smoke_test_spec.rb