Sha256: c7384ecbd9ded6bcc7f868e2637e6261ea96e5e2a218b138e89f42c0883a684b

Contents?: true

Size: 675 Bytes

Versions: 14

Compression:

Stored size: 675 Bytes

Contents

require 'spec/helper'
require 'examples/misc/simple_auth'

describe "SimpleAuth" do
  behaves_like 'browser'
  ramaze(:adapter => :webrick)

  it 'should show start page' do
    Browser.new do
      http.basic_authentication "jill", "password1"
      get('/').should == "Secret Info"
    end

    Browser.new do
      http.basic_authentication "jack", "password2"
      get('/').should == "Secret Info"
    end
  end

  it 'should not show start page' do
    Browser.new do
      lambda{ get('/') }.should.raise
    end

    Browser.new do
      lambda do
        http.basic_authentication "hello", "world"
        lambda{ get('/') }.should.raise
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 4 rubygems

Version Path
Pistos-ramaze-2008.09 spec/examples/simple_auth.rb
Pistos-ramaze-2008.12 spec/examples/simple_auth.rb
Pistos-ramaze-2009.01 spec/examples/simple_auth.rb
Pistos-ramaze-2009.02 spec/examples/simple_auth.rb
manveru-ramaze-2008.09 spec/examples/simple_auth.rb
manveru-ramaze-2008.10 spec/examples/simple_auth.rb
manveru-ramaze-2008.12 spec/examples/simple_auth.rb
manveru-ramaze-2009.01 spec/examples/simple_auth.rb
ptomato-ramaze-2009.02.1 spec/examples/simple_auth.rb
ptomato-ramaze-2009.02 spec/examples/simple_auth.rb
ramaze-2009.01 spec/examples/simple_auth.rb
ramaze-2008.11 spec/examples/simple_auth.rb
ramaze-2009.03 spec/examples/simple_auth.rb
ramaze-2009.02 spec/examples/simple_auth.rb