Sha256: 58012b51aac6cae0d29edec58c3a126c7099009bb29db67672685a619f8603b0

Contents?: true

Size: 459 Bytes

Versions: 8

Compression:

Stored size: 459 Bytes

Contents

require File.expand_path("spec_helper", File.dirname(File.dirname(__FILE__)))

describe "symbol_status plugin" do
  it "accepts a symbol" do
    app(:symbol_status) do |r|
      r.on do
        response.status = :unauthorized
        nil
      end
    end

    status.must_equal 401
  end

  it "accepts a fixnum" do
    app(:symbol_status) do |r|
      r.on do
        response.status = 204
        nil
      end
    end

    status.must_equal 204
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
roda-2.29.0 spec/plugin/symbol_status_spec.rb
roda-2.28.0 spec/plugin/symbol_status_spec.rb
roda-2.27.0 spec/plugin/symbol_status_spec.rb
roda-2.26.0 spec/plugin/symbol_status_spec.rb
roda-2.25.0 spec/plugin/symbol_status_spec.rb
roda-2.24.0 spec/plugin/symbol_status_spec.rb
roda-2.23.0 spec/plugin/symbol_status_spec.rb
roda-2.22.0 spec/plugin/symbol_status_spec.rb