Sha256: 80cb11c6114374a7da5d1299a5f2f07b6a9f68c09814889033db195a00409008

Contents?: true

Size: 368 Bytes

Versions: 22

Compression:

Stored size: 368 Bytes

Contents

require 'spec/helper'

class TCThreadIntoController < Ramaze::Controller
  map :/

  def hello
    Thread.into('goodbye') do |str|
      "#{Ramaze::Action.current.name}, #{str}"
    end.value
  end
end

describe 'Thread.into' do
  behaves_like 'http'
  ramaze

  it 'should provide access to thread vars' do
    get('/hello').body.should == 'hello, goodbye'
  end
end

Version data entries

22 entries across 22 versions & 5 rubygems

Version Path
Pistos-ramaze-2008.09 spec/snippets/thread/into.rb
Pistos-ramaze-2008.12 spec/snippets/thread/into.rb
Pistos-ramaze-2009.01 spec/snippets/thread/into.rb
Pistos-ramaze-2009.02 spec/snippets/thread/into.rb
clivecrous-ramaze-0.3.9.5 spec/snippets/thread/into.rb
manveru-ramaze-2008.07 spec/snippets/thread/into.rb
manveru-ramaze-2008.08 spec/snippets/thread/into.rb
manveru-ramaze-2008.09 spec/snippets/thread/into.rb
manveru-ramaze-2008.10 spec/snippets/thread/into.rb
manveru-ramaze-2008.12 spec/snippets/thread/into.rb
manveru-ramaze-2009.01 spec/snippets/thread/into.rb
ptomato-ramaze-2009.02.1 spec/snippets/thread/into.rb
ptomato-ramaze-2009.02 spec/snippets/thread/into.rb
ramaze-0.3.0 spec/snippets/thread/into.rb
ramaze-0.3.5 spec/snippets/thread/into.rb
ramaze-0.3.9.1 spec/snippets/thread/into.rb
ramaze-0.3.9 spec/snippets/thread/into.rb
ramaze-2009.01 spec/snippets/thread/into.rb
ramaze-2008.11 spec/snippets/thread/into.rb
ramaze-2008.06 spec/snippets/thread/into.rb