Sha256: f0cffa39296dfaa4fd07339f1f071682358ad87369a8c35b25cb4c88d9e5e65e
Contents?: true
Size: 671 Bytes
Versions: 3
Compression:
Stored size: 671 Bytes
Contents
require 'spec_helper' describe GhPreview::Server do def setup_app(file) Capybara.app = GhPreview::Server.new(file) end describe 'the preview process', type: :feature do context 'when file is not present' do it 'should render an error' do setup_app('toto.md') visit '/' expect(page).to have_content "toto.md doesn't exist !" end end context 'when README.md is present' do it 'should render the file' do setup_app(fixture_path('example.md')) visit '/' expect(page).to have_content 'A small Sinatra application to preview GitHub README files, easy ;)' end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gh-preview-1.0.2 | spec/lib/gh_preview/server_spec.rb |
gh-preview-1.0.1 | spec/lib/gh_preview/server_spec.rb |
gh-preview-1.0.0 | spec/lib/gh_preview/server_spec.rb |