Sha256: 863d354ee2a182edd7fa921bc52c22c8ae532805d633fe2913b83ad80c26ff7a

Contents?: true

Size: 672 Bytes

Versions: 1

Compression:

Stored size: 672 Bytes

Contents

require "nwiki"
require "test/unit"
require "rack/test"

class RequestTest < Test::Unit::TestCase
  include ::Rack::Test::Methods

  def app
    Nwiki::Frontend::App.new "spec/examples/sample.git"
  end

  sub_test_case %Q(Get "/") do
    setup do
      get "/"
    end

    test "response is ok" do
      assert last_response.ok?
    end

    test "includes title" do
      title = "ヽ(´・肉・`)ノログ"
      assert do
        last_response.body.include? title
      end
    end

    test "includes subtitle" do
      subtitle = "How do we fighting without fighting?"
      assert do
        last_response.body.include? subtitle
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nwiki-0.2.9 test/test_request.rb