Sha256: 4a23c694127899b0d68e1689a87c8a8ceddda95795b4191ce894279a367e629c
Contents?: true
Size: 593 Bytes
Versions: 3
Compression:
Stored size: 593 Bytes
Contents
require 'spec_helper' module Happy describe Request do describe '#params' do subject do Happy.route do on('symbol') { "Your name is #{params[:name]}!" } on('string') { "Your name is #{params['name']}!" } end end it "is accessible through strings" do response_for { get '/string', 'name' => 'Hendrik' }.body.should == 'Your name is Hendrik!' end it "is accessible through symbols" do response_for { get '/symbol', 'name' => 'Hendrik' }.body.should == 'Your name is Hendrik!' end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
happy-0.1.0 | spec/request_spec.rb |
happy-0.1.0.pre28 | spec/request_spec.rb |
happy-0.1.0.pre27 | spec/request_spec.rb |