Sha256: 3c18bb87912b1156bbe568601080d0006d4cc0d4ff8e384632b019518e46706a
Contents?: true
Size: 815 Bytes
Versions: 4
Compression:
Stored size: 815 Bytes
Contents
require 'ramaze' require 'ramaze/spec/helper' $LOAD_PATH.unshift base = __DIR__/'..' spec_require 'hpricot', 'sequel' require 'start' describe 'Rammit' do behaves_like 'http' base = File.expand_path(__DIR__/'..') ramaze :template_root => base/'template', :public_root => base/'public' it 'should have intro page' do got = get('/') doc = Hpricot(got.body) form = doc.at(:form) form.at('textarea[@name=text]').should.not == nil form.at('input[@type=submit @value="Create a site"]').should.not == nil end it 'should create page from intro page' do got = post('/page/create', 'text' => 'Some text') refer = got.headers['Location'] refer.should.not == nil got = get(refer) doc = Hpricot(got.body) doc.at('div#text').inner_html.should =~ /Some text/ end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ramaze-0.3.0 | examples/rammit/spec/rammit.rb |
ramaze-0.3.5 | examples/rammit/spec/rammit.rb |
ramaze-0.3.9.1 | examples/rammit/spec/rammit.rb |
ramaze-0.3.9 | examples/rammit/spec/rammit.rb |